mirror of https://github.com/python/cpython
Issue #3389: Allow resolving dotted names for handlers in logging configuration files. Thanks to Philip Jenvey for the patch.
This commit is contained in:
parent
0bd10fd5cc
commit
bc7e34f692
|
@ -146,7 +146,10 @@ def _install_handlers(cp, formatters):
|
|||
fmt = cp.get(sectname, "formatter")
|
||||
else:
|
||||
fmt = ""
|
||||
klass = eval(klass, vars(logging))
|
||||
try:
|
||||
klass = eval(klass, vars(logging))
|
||||
except (AttributeError, NameError):
|
||||
klass = _resolve(klass)
|
||||
args = cp.get(sectname, "args")
|
||||
args = eval(args, vars(logging))
|
||||
h = apply(klass, args)
|
||||
|
|
Loading…
Reference in New Issue