summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrin <michael.kerrin@hp.com>2013-04-09 13:51:42 +0000
committerMichael Kerrin <michael.kerrin@hp.com>2013-04-09 14:01:15 +0000
commitdd7c3dc72282ae6e1d9728350a957173d9a54fff (patch)
treebf6d8539a788563b265be92a474f7dccf9d861a8
parentf9207b31f9599d9c8970ad3a3ae5f1e3720526fe (diff)
downloadoslo-dd7c3dc72282ae6e1d9728350a957173d9a54fff.tar.gz
oslo-dd7c3dc72282ae6e1d9728350a957173d9a54fff.tar.xz
oslo-dd7c3dc72282ae6e1d9728350a957173d9a54fff.zip
Incorrect logging setup - duplicating root handlers
Stop adding the log handlers from the root logger to the logger specified via the default_log_levels configuration setting. If the handler should dispatch a event then it will do it once for the specified logger and once for root logger thus duplicating the event. Change-Id: I1a7880322ff53cbdf8048e1d805511ca76929ee3
-rw-r--r--openstack/common/log.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/openstack/common/log.py b/openstack/common/log.py
index 8f4db7c..be30e9f 100644
--- a/openstack/common/log.py
+++ b/openstack/common/log.py
@@ -432,14 +432,11 @@ def _setup_logging_from_conf():
else:
log_root.setLevel(logging.WARNING)
- level = logging.NOTSET
for pair in CONF.default_log_levels:
mod, _sep, level_name = pair.partition('=')
level = logging.getLevelName(level_name)
logger = logging.getLogger(mod)
logger.setLevel(level)
- for handler in log_root.handlers:
- logger.addHandler(handler)
_loggers = {}