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]