]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Avoid logging.getChild for python2.6 compatibility
authorSteven Hardy <shardy@redhat.com>
Wed, 19 Dec 2012 18:01:15 +0000 (18:01 +0000)
committerSteven Hardy <shardy@redhat.com>
Wed, 19 Dec 2012 18:01:15 +0000 (18:01 +0000)
Tweaking common.config setup_logging to avoid using the getChild()
convenience function means we can run on python 2.6, as getChild was
new in python 2.7

Change-Id: I03698ad09eb16d4f1004512d27b049f22b41c22c
Signed-off-by: Steven Hardy <shardy@redhat.com>
heat/common/config.py

index 16cf488a1b92b039d3f073605e74c2ef4746de1c..3209e8cef6407743f5f067e4ccb4cb7662750e8c 100644 (file)
@@ -145,7 +145,7 @@ def setup_logging():
         root_logger.setLevel(logging.WARNING)
 
     # quiet down the qpid logging
-    root_logger.getChild('qpid.messaging').setLevel(logging.INFO)
+    root_logger.manager.getLogger('qpid.messaging').setLevel(logging.INFO)
 
     formatter = logging.Formatter(cfg.CONF.log_format,
                                   cfg.CONF.log_date_format)