summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorZhiteng Huang <zhiteng.huang@intel.com>2013-03-13 00:27:48 +0800
committerZhiteng Huang <zhiteng.huang@intel.com>2013-03-13 00:27:48 +0800
commit9fe688a412d910e29fdf97fd0f97a7f815db6c8f (patch)
treef10067cc2b98629662af5910386d0d845b48fcbd /openstack
parent21925b63af87c36be97eec5b212e06477471bb1e (diff)
downloadoslo-9fe688a412d910e29fdf97fd0f97a7f815db6c8f.tar.gz
oslo-9fe688a412d910e29fdf97fd0f97a7f815db6c8f.tar.xz
oslo-9fe688a412d910e29fdf97fd0f97a7f815db6c8f.zip
Initialize root logger in _setup_logging_from_conf()
log.setup() doesn't really initialize root logger, therefore logging in 3rd party library such as stevedore doesn't work properly. This patch enable root logger initialization. Fix bug: # 1073241 Change-Id: I6fa41b2ba41ff97ad0280f8774a26887d294423e
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/log.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack/common/log.py b/openstack/common/log.py
index b795ee4..57d1cdd 100644
--- a/openstack/common/log.py
+++ b/openstack/common/log.py
@@ -328,7 +328,7 @@ def setup(product_name):
if CONF.log_config:
logging.config.fileConfig(CONF.log_config)
else:
- _setup_logging_from_conf(product_name)
+ _setup_logging_from_conf()
sys.excepthook = _create_logging_excepthook(product_name)
@@ -362,8 +362,8 @@ def _find_facility_from_conf():
return facility
-def _setup_logging_from_conf(product_name):
- log_root = getLogger(product_name).logger
+def _setup_logging_from_conf():
+ log_root = getLogger(None).logger
for handler in log_root.handlers:
log_root.removeHandler(handler)