From 309126a5277a8735f76a2344cfb2aaa3ae13a05a Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Fri, 19 May 2023 13:29:33 -0700 Subject: [PATCH] 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. --- common/logging_extra.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/logging_extra.py b/common/logging_extra.py index 5baaac1f90..899ad7a391 100644 --- a/common/logging_extra.py +++ b/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)