diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-11-15 14:20:18 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-11-15 14:20:18 (GMT) |
commit | 8d27023a7e4129609ab005d6e1a437214bca1188 (patch) | |
tree | a3741487c0bc7ab45ae17b2a00375661a4ed0b1c /Lib/logging/config.py | |
parent | 8f2b6ad96f15f38593cc68eae2b85390a4bee400 (diff) | |
download | cpython-8d27023a7e4129609ab005d6e1a437214bca1188.zip cpython-8d27023a7e4129609ab005d6e1a437214bca1188.tar.gz cpython-8d27023a7e4129609ab005d6e1a437214bca1188.tar.bz2 |
Allow configuration of handler properties.
Diffstat (limited to 'Lib/logging/config.py')
-rw-r--r-- | Lib/logging/config.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index 0694d21..ef7d2bc 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -710,6 +710,7 @@ class DictConfigurator(BaseConfigurator): 'address' in config: config['address'] = self.as_tuple(config['address']) factory = klass + props = config.pop('.', None) kwargs = dict([(k, config[k]) for k in config if valid_ident(k)]) try: result = factory(**kwargs) @@ -728,6 +729,9 @@ class DictConfigurator(BaseConfigurator): result.setLevel(logging._checkLevel(level)) if filters: self.add_filters(result, filters) + if props: + for name, value in props.items(): + setattr(result, name, value) return result def add_handlers(self, logger, handlers): |