From ea08e2399e6a64eed06799ce59f54a54052d9aca Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 24 Oct 2021 23:30:41 -0700 Subject: [PATCH] Fix root.handlers check which I accidentally removed. --- voussoirkit/vlogging.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/voussoirkit/vlogging.py b/voussoirkit/vlogging.py index f2c6d6d..83f26fd 100644 --- a/voussoirkit/vlogging.py +++ b/voussoirkit/vlogging.py @@ -54,6 +54,9 @@ def basic_config(level): This adds a handler with the given level to the root logger, but only if it has no handlers yet. ''' + if root.handlers: + return + handler = StreamHandler() handler.setFormatter(Formatter('{levelname}:{name}:{message}', style='{')) handler.setLevel(level)