Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exception_reports/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def filter(self, record):
try:
record.data["error_report"] = create_exception_report(exc_type, exc_value, tb, self.output_format, self.storage_backend)
except Exception as e:
logger.warning(f"Error generating exception report {repr(e)}") # noqa
logger.error(f"Error generating exception report {repr(e)}", exc_info=True) # noqa
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason to not is that this could create an infinite recursion situation. Clearly only doing a warning is great either, but this might be making things worse.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't really explain. One of the functionalities of the library is to create exception reports for error level logs so this would be calling itself.


return True

Expand Down
2 changes: 1 addition & 1 deletion exception_reports/storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def write(self, filename, data):
return uploaded_url

except Exception:
logger.warning("Error saving exception to s3", exc_info=True)
logger.error("Error saving exception to s3", exc_info=True)


def upload_to_s3(aws_key, aws_secret, bucket, filename, contents, content_type):
Expand Down