From 87378db80cf44da06be9b5c6c63b4e95c771f2ff Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Mon, 27 May 2019 09:52:34 +0200 Subject: [PATCH] log_helper: provide logging.NOTSET --- oletools/common/log_helper/log_helper.py | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/oletools/common/log_helper/log_helper.py b/oletools/common/log_helper/log_helper.py index 1f633f2..4c1f2b3 100644 --- a/oletools/common/log_helper/log_helper.py +++ b/oletools/common/log_helper/log_helper.py @@ -62,11 +62,19 @@ LOG_LEVELS = { 'critical': logging.CRITICAL } +#: provide this constant to modules, so they do not have to import +#: :py:mod:`logging` for themselves just for this one constant. +NOTSET = logging.NOTSET + DEFAULT_LOGGER_NAME = 'oletools' DEFAULT_MESSAGE_FORMAT = '%(levelname)-8s %(message)s' class LogHelper: + + #: for convenience: here again (see also :py:data:`log_helper.NOTSET`) + NOTSET = logging.NOTSET + def __init__(self): self._all_names = set() # set so we do not have duplicates self._use_json = False -- libgit2 0.21.4