Log tracebacks to syslog when using fireball mode.

reviewable/pr18780/r1
Michael DeHaan 12 years ago
parent e4e09fea88
commit 08161d1e4d

@ -71,6 +71,7 @@ import syslog
import signal import signal
import time import time
import signal import signal
import traceback
syslog.openlog('ansible-%s' % os.path.basename(__file__)) syslog.openlog('ansible-%s' % os.path.basename(__file__))
PIDFILE = os.path.expanduser("~/.fireball.pid") PIDFILE = os.path.expanduser("~/.fireball.pid")
@ -244,7 +245,8 @@ def daemonize(module, password, port, minutes):
serve(module, password, port, minutes) serve(module, password, port, minutes)
except Exception, e: except Exception, e:
log("exception caught, exiting fireball mode: %s" % e) tb = traceback.format_exc()
log("exception caught, exiting fireball mode: %s\n%s" % (e, tb))
sys.exit(0) sys.exit(0)
def main(): def main():

Loading…
Cancel
Save