From: Ian Jackson Date: Sun, 23 Apr 2017 19:51:06 +0000 (+0100) Subject: syslog handling: print tracebacks when logging failure objects X-Git-Tag: hippotat/1.0.0~55^2~35 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;ds=sidebyside;h=eb6dcb5af291c1c5457c88979ed4b077a4b28367;hp=d96f4d70037bcd739dd9674f4fb2f3d38abce956;p=hippotat.git syslog handling: print tracebacks when logging failure objects Signed-off-by: Ian Jackson --- 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')