logging: change event_name arg (#28232)

This doesn't change anything in practice, but makes it harder to write a bug where a kwarg with the name `event` would overwrite the event name.
pull/28235/head
Cameron Clough 2 years ago committed by GitHub
parent ac2c87246a
commit 309126a527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      common/logging_extra.py

@ -153,9 +153,9 @@ class SwagLogger(logging.Logger):
def bind_global(self, **kwargs):
self.global_ctx.update(kwargs)
def event(self, event_name, *args, **kwargs):
def event(self, event, *args, **kwargs):
evt = NiceOrderedDict()
evt['event'] = event_name
evt['event'] = event
if args:
evt['args'] = args
evt.update(kwargs)

Loading…
Cancel
Save