From b828078dde8cdc57f66f5333af497af6da8fd2e4 Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Mon, 7 Jul 2014 19:46:55 +0700 Subject: [PATCH] Fixed default logging level in setup_loghandlers. --- rq/logutils.py | 4 ++-- rq/scripts/rqworker.py | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/rq/logutils.py b/rq/logutils.py index a5c1d9f..2a23ae2 100644 --- a/rq/logutils.py +++ b/rq/logutils.py @@ -14,8 +14,8 @@ except ImportError: from rq.utils import ColorizingStreamHandler -def setup_loghandlers(level=None): - logger = logging.getLogger() +def setup_loghandlers(level='INFO'): + logger = logging.getLogger('rq.worker') if not logger.handlers: logger.setLevel(level) formatter = logging.Formatter(fmt='%(asctime)s %(message)s', diff --git a/rq/scripts/rqworker.py b/rq/scripts/rqworker.py index 01850dd..d01dff9 100644 --- a/rq/scripts/rqworker.py +++ b/rq/scripts/rqworker.py @@ -17,8 +17,6 @@ from rq.scripts import (add_standard_arguments, read_config_file, setup_default_arguments, setup_redis) from rq.utils import import_attribute -logger = logging.getLogger(__name__) - def parse_args(): parser = argparse.ArgumentParser(description='Starts an RQ worker.')