Commit feca7bb9 authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos
Browse files

Enable logging of unhandled exceptions

Use the traceback module to log unhandled exceptions to the logfile when
running as a daemon.
Signed-off-by: default avatarApollon Oikonomopoulos <>
parent b0b3ad51
......@@ -27,6 +27,7 @@ import time
import logging
import logging.handlers
import threading
import traceback
import subprocess
import daemon
......@@ -912,7 +913,13 @@ if __name__ == "__main__":
logger.addHandler(handler)"Ready to serve requests")
except Exception:
if opts.daemonize:
exc = "".join(traceback.format_exception(*sys.exc_info()))
# vim: set ts=4 sts=4 sw=4 et :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment