We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8df2ee commit 238c5bbCopy full SHA for 238c5bb
mostlyai/qa/logging.py
@@ -23,12 +23,10 @@ def init_logging() -> None:
23
Initialize the logging configuration to stdout.
24
"""
25
26
- # log to stdout
27
- handler = logging.StreamHandler(stream=sys.stdout)
28
- handler.setFormatter(logging.Formatter("[%(asctime)s] %(levelname)-7s: %(message)s"))
29
- handler.setLevel(logging.INFO)
30
-
+ _LOG.propagate = False
31
if not _LOG.hasHandlers():
+ handler = logging.StreamHandler(stream=sys.stdout)
+ handler.setFormatter(logging.Formatter("[%(asctime)s] %(levelname)-7s: %(message)s"))
+ handler.setLevel(logging.INFO)
32
_LOG.addHandler(handler)
33
_LOG.setLevel(logging.INFO)
34
- _LOG.propagate = False
0 commit comments