Is there an existing issue for this?
What happened?
The InterceptHandler in backend/app/logging/setup_logging.py calls
self.format(record) while record.exc_info and record.stack_info are still set.
Python’s Formatter.format() automatically appends traceback and stack output if
these fields are truthy.
This violates the project rule that exc_info and stack_info should not be
preserved when rerouting logs.
Fix proposal:
record.exc_info = None
record.stack_info = None
msg = self.format(record)
This should be applied around lines 238–252.
Record
Checklist before Submitting
Is there an existing issue for this?
What happened?
The InterceptHandler in backend/app/logging/setup_logging.py calls
self.format(record) while record.exc_info and record.stack_info are still set.
Python’s Formatter.format() automatically appends traceback and stack output if
these fields are truthy.
This violates the project rule that exc_info and stack_info should not be
preserved when rerouting logs.
Fix proposal:
record.exc_info = None
record.stack_info = None
msg = self.format(record)
This should be applied around lines 238–252.
Record
Checklist before Submitting