From 1cff3cedcb0fc024b3447a3347bcb82aede23ab2 Mon Sep 17 00:00:00 2001 From: Hidden Z Date: Sun, 31 Oct 2010 18:38:27 +0000 Subject: [PATCH] web/lib/utils.py: bugfix: take WatchedFileHandler properly --- web/lib/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/lib/utils.py b/web/lib/utils.py index f443e41..15e1d25 100644 --- a/web/lib/utils.py +++ b/web/lib/utils.py @@ -1,4 +1,5 @@ import logging +from logging import handlers def get_logger(filename=None, log_level='debug'): """ Prepare logger instance for our scripts """ @@ -16,7 +17,7 @@ def get_logger(filename=None, log_level='debug'): logger = logging.getLogger(__name__) logger.setLevel(level) if filename: - handler = logging.WatchedFileHandler(filename) + handler = logging.handlers.WatchedFileHandler(filename) else: handler = logging.StreamHandler() handler.setFormatter(formatter)