mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 13:46:02 -04:00
Use the right constructor for log records (#8278)
Update `log_function` to use the right factory to create log records, to make sure that they have `request` attributes. Fixes: #8267.
This commit is contained in:
parent
deedb91732
commit
703e2b8a96
2 changed files with 4 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue