From baaf4049f62b7f1f5ba4228d6a4ce6fed155d987 Mon Sep 17 00:00:00 2001 From: Yusarina Date: Thu, 20 Nov 2025 03:21:31 +0000 Subject: [PATCH] Logging Fix --- core/logging_setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/logging_setup.py b/core/logging_setup.py index dbfe003..b6b51d8 100644 --- a/core/logging_setup.py +++ b/core/logging_setup.py @@ -33,9 +33,10 @@ def configure_logging(enabled: bool = False, level: str = "WARNING") -> None: logger.addHandler(handler) def error_with_traceback(msg, *args, **kwargs): - if isinstance(kwargs.get('exception', None), Exception): + # If exc_info is True, include traceback in the message + if kwargs.get('exc_info', False): full_msg = f"{msg}\n{traceback.format_exc()}" - _original_error(full_msg, *args, **{**kwargs, 'exc_info': False}) + _original_error(full_msg, *args, **{k: v for k, v in kwargs.items() if k != 'exc_info'}) else: _original_error(msg, *args, **kwargs)