diff --git a/__init__.py b/__init__.py index 042684b..b318c21 100644 --- a/__init__.py +++ b/__init__.py @@ -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):