From bb478f369d896c1ac4fac90a99307b828c65e084 Mon Sep 17 00:00:00 2001 From: karlicoss Date: Thu, 12 Oct 2023 22:29:14 +0100 Subject: [PATCH] core/logging: no need for super call in Filter --- my/core/logging.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/my/core/logging.py b/my/core/logging.py index 11567f1..accfc2e 100644 --- a/my/core/logging.py +++ b/my/core/logging.py @@ -165,16 +165,13 @@ def _setup_handlers_and_formatters(name: str) -> None: # todo also amend by post about defensive error handling? class AddExceptionTraceback(logging.Filter): def filter(self, record: logging.LogRecord) -> bool: - s = super().filter(record) - if s is False: - return False if record.levelname == 'ERROR': exc = record.msg if isinstance(exc, BaseException): if record.exc_info is None or record.exc_info == (None, None, None): exc_info = (type(exc), exc, exc.__traceback__) record.exc_info = exc_info - return s + return True # todo also save full log in a file?