Handle exception module logs - by deleting exc_info

This commit is contained in:
Dirk Alders 2025-03-23 15:59:56 +01:00
parent 7003c13ef8
commit 74e6f20d09

View File

@ -90,7 +90,11 @@ class collectingHandler(logging.Handler):
def get_logs(self):
rv = []
while len(self.MY_LOGS) > 0:
rv.append(self.MY_LOGS.pop(0))
entry = self.MY_LOGS.pop(0)
# remove exception info (not json iterasable)
if 'exc_info' in entry:
entry.pop('exc_info')
rv.append(entry)
return rv
def get_str(self, logs=None, fmt=SHORT_FMT):