chiark
/
gitweb
/
~ian
/
hippotat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
syslog handling: print tracebacks when logging failure objects
[hippotat.git]
/
hippotatd
diff --git
a/hippotatd
b/hippotatd
index e2bed4216091b5dec535c299ccf896468969ef64..b08ce6673d9cd9373a7025a7908f0f3ef3fc0a97 100755
(executable)
--- 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)
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')
glp = twisted.logger.globalLogPublisher
glp.addObserver(emit)
log_debug(DBG.INIT, 'starting to log to syslog')