bpo-38586: setting logging.Handler .name property in fileConfig (GH-16918)

This commit is contained in:
Lucas Cimon 2019-10-31 09:06:25 +01:00 committed by Vinay Sajip
parent 79d4ed102a
commit b15100fe7d
3 changed files with 26 additions and 0 deletions

View file

@ -143,6 +143,7 @@ def _install_handlers(cp, formatters):
kwargs = section.get("kwargs", '{}')
kwargs = eval(kwargs, vars(logging))
h = klass(*args, **kwargs)
h.name = hand
if "level" in section:
level = section["level"]
h.setLevel(level)