From ca5f78ac21ebe2665447d5a625c9030041f08c30 Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Sun, 22 Sep 2013 21:52:16 +0100 Subject: [PATCH] Removes kombu.log.anon_logger --- kombu/log.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/kombu/log.py b/kombu/log.py index 5ef816d9..47b9074b 100644 --- a/kombu/log.py +++ b/kombu/log.py @@ -13,9 +13,9 @@ from .utils.functional import maybe_evaluate __all__ = ['LogMixin', 'LOG_LEVELS', 'get_loglevel', 'setup_logging'] -LOG_LEVELS = dict(logging._levelNames) -LOG_LEVELS['FATAL'] = logging.FATAL -LOG_LEVELS[logging.FATAL] = 'FATAL' +FATAL = logging.FATAL +LOG_LEVELS = dict({'FATAL': logging.fatal, FATAL: 'FATAL'}, + **logging._levelNames) DISABLE_TRACEBACKS = os.environ.get('DISABLE_TRACEBACKS') @@ -33,12 +33,6 @@ def get_logger(logger): return logger -def anon_logger(name): - logger = logging.getLogger(name) - logger.addHandler(NullHandler()) - return logger - - def get_loglevel(level): if isinstance(level, string_t): return LOG_LEVELS[level]