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.
This commit is contained in:
Cameron Clough
2023-05-19 13:29:33 -07:00
committed by GitHub
parent ac2c87246a
commit 309126a527
+2 -2
View File
@@ -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)