Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Use the right constructor for log records #8278

Merged
merged 1 commit into from
Sep 8, 2020
Merged
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
1 change: 1 addition & 0 deletions changelog.d/8278.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug which cause the logging system to report errors, if `DEBUG` was enabled and no `context` filter was applied.
6 changes: 3 additions & 3 deletions synapse/logging/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ def _log_debug_as_f(f, msg, msg_args):
lineno = f.__code__.co_firstlineno
pathname = f.__code__.co_filename

record = logging.LogRecord(
record = logger.makeRecord(
name=name,
level=logging.DEBUG,
pathname=pathname,
lineno=lineno,
fn=pathname,
lno=lineno,
msg=msg,
args=msg_args,
exc_info=None,
Expand Down