From fc7daf999673acd328e2f5a1224639983341266c Mon Sep 17 00:00:00 2001 From: MichaƂ Klichowicz Date: Mon, 2 Oct 2023 22:53:05 +0200 Subject: Resetting logging setup on each run so config changes won't get ignored --- src/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.py b/src/main.py index e90360b..d811095 100644 --- a/src/main.py +++ b/src/main.py @@ -20,6 +20,8 @@ def get_config(): def setup_logging(config): + for handler in logging.root.handlers[:]: + logging.root.removeHandler(handler) logging_levels = [logging.WARNING, logging.INFO, logging.DEBUG] logging.basicConfig( level=logging_levels[config['settings'].get('info_messages', 0)], -- cgit v1.2.3