]> code.ossystems Code Review - openembedded-core.git/commitdiff
Apply fix for issue where the loggers were constructed with the wrong class
authorChris Larson <chris_larson@mentor.com>
Wed, 8 Sep 2010 18:31:36 +0000 (11:31 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:34 +0000 (14:46 +0000)
(Bitbake rev: 1b21daf052c49f3126dac001712ec01ad63c5f60)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/__init__.py

index 11983f0e0e95e1ecaed17ec078d21382065d6068..3f00a8ee59a98de8cf86095f7be668a3d7650f8d 100644 (file)
@@ -29,7 +29,6 @@ if sys.version_info < (2, 6, 0):
 
 import os
 import logging
-import bb.msg
 
 class NullHandler(logging.Handler):
     def emit(self, record):
@@ -58,6 +57,10 @@ logger = logging.getLogger("BitBake")
 logger.addHandler(NullHandler())
 logger.setLevel(logging.INFO)
 
+# This has to be imported after the setLoggerClass, as the import of bb.msg
+# can result in construction of the various loggers.
+import bb.msg
+
 if "BBDEBUG" in os.environ:
     level = int(os.environ["BBDEBUG"])
     if level: