Log exceptions to screen

This commit is contained in:
Keith Edmunds 2022-08-15 12:20:40 +01:00
parent dcc84e0df1
commit eff80d684e

View File

@ -24,7 +24,8 @@ class DebugStdoutFilter(logging.Filter):
"""Filter debug messages sent to stdout"""
def filter(self, record: logging.LogRecord):
if record.levelno != logging.DEBUG:
# Exceptions are logged at ERROR level
if record.levelno in [logging.DEBUG, logging.ERROR]:
return True
if record.module in Config.DEBUG_MODULES:
return True