diff options
author | Michał Klichowicz <emkael@tlen.pl> | 2023-10-02 22:53:05 +0200 |
---|---|---|
committer | Michał Klichowicz <emkael@tlen.pl> | 2023-10-02 22:55:17 +0200 |
commit | fc7daf999673acd328e2f5a1224639983341266c (patch) | |
tree | d18f7cab9661c8b1d1c23bc2e10460d0563f0550 /src | |
parent | c16eb493bb130ad94ece708248235888c9224301 (diff) |
Resetting logging setup on each run so config changes won't get ignored
Diffstat (limited to 'src')
-rw-r--r-- | src/main.py | 2 |
1 files changed, 2 insertions, 0 deletions
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)], |