From eb6dcb5af291c1c5457c88979ed4b077a4b28367 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 23 Apr 2017 20:51:06 +0100 Subject: [PATCH] syslog handling: print tracebacks when logging failure objects Signed-off-by: Ian Jackson --- hippotatd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hippotatd b/hippotatd index e2bed42..b08ce66 100755 --- a/hippotatd +++ b/hippotatd @@ -375,6 +375,10 @@ def daemonise(): elif level == LogLevel.warn : sl = syslog.LOG_WARNING else : sl = syslog.LOG_INFO syslog.syslog(sl,m) + failure = event.get('log_failure') + if failure is not None: + for l in failure.getTraceback().split('\n'): + syslog.syslog(sl,l) glp = twisted.logger.globalLogPublisher glp.addObserver(emit) log_debug(DBG.INIT, 'starting to log to syslog') -- 2.11.0