Skip to content

Commit 6daa60e

Browse files
authored
Fix stream logging (#3489)
Equivalent to what was done by coloredlogs before it was removed in acad2ea (just without colour)
1 parent a146c9f commit 6daa60e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

bot/log.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import sys
23
from logging import handlers
34
from pathlib import Path
45

@@ -24,6 +25,10 @@ def setup() -> None:
2425
file_handler.setFormatter(core_logging.log_format)
2526
root_log.addHandler(file_handler)
2627

28+
stream_handler = logging.StreamHandler(sys.stdout)
29+
stream_handler.setFormatter(core_logging.log_format)
30+
root_log.addHandler(stream_handler)
31+
2732
root_log.setLevel(logging.DEBUG if constants.DEBUG_MODE else logging.INFO)
2833

2934
_set_trace_loggers()

0 commit comments

Comments
 (0)