summaryrefslogtreecommitdiffstats
path: root/Lib/logging/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging/config.py')
-rw-r--r--Lib/logging/config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index d692514..b3f4e28 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -143,9 +143,11 @@ def _install_handlers(cp, formatters):
klass = eval(klass, vars(logging))
except (AttributeError, NameError):
klass = _resolve(klass)
- args = section["args"]
+ args = section.get("args", '()')
args = eval(args, vars(logging))
- h = klass(*args)
+ kwargs = section.get("kwargs", '{}')
+ kwargs = eval(kwargs, vars(logging))
+ h = klass(*args, **kwargs)
if "level" in section:
level = section["level"]
h.setLevel(level)