Log traceback on errors in Watcher
This commit makes sure exception is logged with traceback when an error happened in Watcher (e.g. when processing the event). Change-Id: I54909622dae5e05e63576e4b504650b6c3fcb5c5
This commit is contained in:
parent
6bc68ce6c2
commit
6c3a73cc67
|
@ -191,9 +191,10 @@ class Watcher(health.HealthHandler):
|
|||
self._idle[path] = True
|
||||
if not (self._running and path in self._resources):
|
||||
return
|
||||
except Exception as e:
|
||||
LOG.warning("Restarting(%s) watching '%s': %s",
|
||||
attempts, path, e)
|
||||
except Exception:
|
||||
LOG.exception("Caught exception while watching.")
|
||||
LOG.warning("Restarting(%s) watching '%s'.",
|
||||
attempts, path)
|
||||
attempts += 1
|
||||
retry = True
|
||||
self._idle[path] = True
|
||||
|
|
Loading…
Reference in New Issue