Log unhandled exceptions in /tmp/sugar.log

This commit is contained in:
Ivan Krstić 2006-09-11 01:29:20 -04:00
parent 3bcc3d0542
commit 8256be0cf2

View File

@ -109,6 +109,9 @@ def start(console_id, console = None):
root_logger = logging.getLogger('')
root_logger.setLevel(logging.DEBUG)
root_logger.addHandler(Handler(queue))
fileh = logging.FileHandler('/tmp/sugar.log')
fileh.setFormatter(logging.Formatter("""[%(asctime)s] %(message)s"""))
root_logger.addHandler(fileh)
global __queue
__queue = queue