From ed35590ac636bcee3fcf823858912017d0716633 Mon Sep 17 00:00:00 2001 From: Kim Oliver Drechsel Date: Sat, 13 Aug 2022 12:09:43 +0200 Subject: [PATCH] Fix _logger assignment --- loghandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loghandler.py b/loghandler.py index 6b18ce7..5957937 100644 --- a/loghandler.py +++ b/loghandler.py @@ -6,6 +6,8 @@ import colorlog def loghandler(): + _logger = colorlog.getLogger(__name__) + loglevel = os.getenv('LOG_LEVEL', "INFO") match loglevel.lower(): @@ -22,8 +24,6 @@ def loghandler(): case _: raise ValueError("Definied value of LOG_LEVEL is not known. Possible values are debug, info, warn, warning, error, crit and critical.") - _logger = colorlog.getLogger(__name__) - handler = colorlog.StreamHandler(sys.stdout) if loglevel: handler.setLevel(logging.DEBUG)