Initialize streamhandler early to have it apply to all logs

This commit is contained in:
Matthias
2020-08-14 20:08:55 +02:00
parent cdfcdb86c9
commit c4f78203ab
2 changed files with 3 additions and 3 deletions

View File

@@ -48,6 +48,7 @@ def setup_logging_pre() -> None:
logging.basicConfig(
level=logging.INFO,
format=LOGFORMAT,
handlers=[logging.StreamHandler(sys.stderr)]
)
@@ -61,8 +62,6 @@ def setup_logging(config: Dict[str, Any]) -> None:
logfile = config.get('logfile')
logging.root.addHandler(logging.StreamHandler(sys.stderr))
if logfile:
s = logfile.split(':')
if s[0] == 'syslog':