mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
Apply fix for issue where the loggers were constructed with the wrong class
(Bitbake rev: 1b21daf052c49f3126dac001712ec01ad63c5f60) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
9c2bcae35e
commit
a4b195f180
@@ -29,7 +29,6 @@ if sys.version_info < (2, 6, 0):
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import bb.msg
|
|
||||||
|
|
||||||
class NullHandler(logging.Handler):
|
class NullHandler(logging.Handler):
|
||||||
def emit(self, record):
|
def emit(self, record):
|
||||||
@@ -58,6 +57,10 @@ logger = logging.getLogger("BitBake")
|
|||||||
logger.addHandler(NullHandler())
|
logger.addHandler(NullHandler())
|
||||||
logger.setLevel(logging.INFO)
|
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:
|
if "BBDEBUG" in os.environ:
|
||||||
level = int(os.environ["BBDEBUG"])
|
level = int(os.environ["BBDEBUG"])
|
||||||
if level:
|
if level:
|
||||||
|
|||||||
Reference in New Issue
Block a user