From eff80d684e65230105763b058945907c39f2bbd7 Mon Sep 17 00:00:00 2001 From: Keith Edmunds Date: Mon, 15 Aug 2022 12:20:40 +0100 Subject: [PATCH] Log exceptions to screen --- app/log.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/log.py b/app/log.py index ab61170..bbb607c 100644 --- a/app/log.py +++ b/app/log.py @@ -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