aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-14 23:08:39 +0000
committerGravatar jesopo2018-11-14 23:08:39 +0000
commit8300c84f6a77602f5bb334d298e37e02466e2c9b (patch)
tree152a8ef6cd1627f0d4aa4e676ac592ef7552d84c
parentTypo in src/Database.py, 'total_millisecons' -> 'total_milliseconds' (diff)
signature
Log event timing in 1 message, not 2
-rw-r--r--src/EventManager.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/EventManager.py b/src/EventManager.py
index 0a9846da..5dba8f73 100644
--- a/src/EventManager.py
+++ b/src/EventManager.py
@@ -178,8 +178,6 @@ 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)
@@ -197,8 +195,8 @@ class EventHook(object):
raise
total_milliseconds = (time.monotonic() - start) * 1000
- self.log.trace("event \"%s\" called in %fms", [
- event_path, total_milliseconds])
+ self.log.trace("called event in %fms: \"%s\" (params: %s)",
+ [total_milliseconds, event_path, kwargs])
self.check_purge()