Only log exceptions when they're not unsafe
This commit is contained in:
parent
42a1cda92c
commit
6c6d593e6d
1 changed files with 4 additions and 3 deletions
|
@ -226,9 +226,10 @@ class EventHook(object):
|
||||||
try:
|
try:
|
||||||
returns.append(hook.call(event))
|
returns.append(hook.call(event))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error("failed to call event \"%s\"",
|
if safe:
|
||||||
[self._get_path()], exc_info=True)
|
self.log.error("failed to call event \"%s\"",
|
||||||
if not safe:
|
[self._get_path()], exc_info=True)
|
||||||
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
total_milliseconds = (time.monotonic() - start) * 1000
|
total_milliseconds = (time.monotonic() - start) * 1000
|
||||||
|
|
Loading…
Reference in a new issue