mirror of https://github.com/MISP/PyMISP
chg: Follow best practices and remove the logging handler.
Fixes: #717 Reference: https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library Documentation: https://docs.python.org/3/howto/logging.htmlpull/749/head
parent
3252361b3c
commit
00ba313eae
|
@ -3,14 +3,7 @@ import logging
|
|||
import sys
|
||||
import warnings
|
||||
|
||||
FORMAT = "%(levelname)s [%(filename)s:%(lineno)s - %(funcName)s() ] %(message)s"
|
||||
formatter = logging.Formatter(FORMAT)
|
||||
default_handler = logging.StreamHandler()
|
||||
default_handler.setFormatter(formatter)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.addHandler(default_handler)
|
||||
logger.setLevel(logging.WARNING)
|
||||
|
||||
|
||||
def warning_2022():
|
||||
|
|
Loading…
Reference in New Issue