summaryrefslogtreecommitdiffstats
path: root/Lib/logging/config.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-05-25 10:20:34 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-05-25 10:20:34 (GMT)
commit3b84eae03ebd8122fdbdced3d85999dd9aedfc7e (patch)
tree24214ca8e3ee6c15881dc8df29e94438ad9140b0 /Lib/logging/config.py
parente08b583d8828adefa6fba097a5c1405d78dbc759 (diff)
downloadcpython-3b84eae03ebd8122fdbdced3d85999dd9aedfc7e.zip
cpython-3b84eae03ebd8122fdbdced3d85999dd9aedfc7e.tar.gz
cpython-3b84eae03ebd8122fdbdced3d85999dd9aedfc7e.tar.bz2
Closes #18046: Simplified logging internals relating to levels and their names. Thanks to Alex Gaynor for the patch.
Diffstat (limited to 'Lib/logging/config.py')
-rw-r--r--Lib/logging/config.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index dbfd2c6..b882a62 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -144,7 +144,7 @@ def _install_handlers(cp, formatters):
h = klass(*args)
if "level" in section:
level = section["level"]
- h.setLevel(logging._levelNames[level])
+ h.setLevel(level)
if len(fmt):
h.setFormatter(formatters[fmt])
if issubclass(klass, logging.handlers.MemoryHandler):
@@ -191,7 +191,7 @@ def _install_loggers(cp, handlers, disable_existing):
log = root
if "level" in section:
level = section["level"]
- log.setLevel(logging._levelNames[level])
+ log.setLevel(level)
for h in root.handlers[:]:
root.removeHandler(h)
hlist = section["handlers"]
@@ -237,7 +237,7 @@ def _install_loggers(cp, handlers, disable_existing):
existing.remove(qn)
if "level" in section:
level = section["level"]
- logger.setLevel(logging._levelNames[level])
+ logger.setLevel(level)
for h in logger.handlers[:]:
logger.removeHandler(h)
logger.propagate = propagate