From 74f0d5a5074136a4bcc48fa70f982dd40376caa5 Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 28 Nov 2024 00:00:09 +0100 Subject: [PATCH] comment logger trace when DEBUG is it necessary? --- utils/logger.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/utils/logger.py b/utils/logger.py index 886d731..bfa14c2 100644 --- a/utils/logger.py +++ b/utils/logger.py @@ -31,10 +31,13 @@ class CustomFormatter(logging.Formatter): # Highlight the final formatted message record.msg = self.highlight_message(record.msg, color) - # provide trace when DEBUG config - if settings.DEBUG: - import traceback - print(traceback.format_exc()) + # pedro says: I discovered that trace is provided anyway with + # this commented (reason: strange None msgs) + # is this needed? + ### provide trace when DEBUG config + #if settings.DEBUG: + # import traceback + # print(traceback.format_exc()) return super().format(record)