aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-26 14:23:20 +0000
committerGravatar jesopo2018-11-26 14:23:20 +0000
commit1b03d31c6b8aed3260108299afc9a435131ac972 (patch)
tree6535e101ee0c224637217a51807b68f4a64f7149 /src
parentLog any unhandled (critical) exceptions that happen under `bot.run()` in (diff)
signature
Switch back to logging events as 2 messages as a lot of other logs can happen
between the start and end of an event and grouping them together is very useful
Diffstat (limited to 'src')
-rw-r--r--src/EventManager.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/EventManager.py b/src/EventManager.py
index 5dba8f73..a9ee6066 100644
--- a/src/EventManager.py
+++ b/src/EventManager.py
@@ -178,6 +178,8 @@ class EventHook(object):
def _call(self, kwargs: dict, safe: bool, maximum: typing.Optional[int]
) -> typing.List[typing.Any]:
event_path = self._get_path()
+ self.log.trace("calling event: \"%s\" (params: %s)",
+ [event_path,kwargs])
start = time.monotonic()
event = self._make_event(kwargs)
@@ -195,8 +197,8 @@ class EventHook(object):
raise
total_milliseconds = (time.monotonic() - start) * 1000
- self.log.trace("called event in %fms: \"%s\" (params: %s)",
- [total_milliseconds, event_path, kwargs])
+ self.log.trace("event \"%s\" called in %fms",
+ [event_path, total_milliseconds])
self.check_purge()