chiark
/
gitweb
/
~mdw
/
hippotat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d96f4d7
)
syslog handling: print tracebacks when logging failure objects
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 23 Apr 2017 19:51:06 +0000
(20:51 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 23 Apr 2017 19:51:06 +0000
(20:51 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
hippotatd
patch
|
blob
|
blame
|
history
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)
+ 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')