From 8256be0cf2cc714c54c2d3437bbcb43da43d0ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Krsti=C4=87?= Date: Mon, 11 Sep 2006 01:29:20 -0400 Subject: [PATCH] Log unhandled exceptions in /tmp/sugar.log --- sugar/logger.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sugar/logger.py b/sugar/logger.py index fa050de8..52825037 100644 --- a/sugar/logger.py +++ b/sugar/logger.py @@ -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