diff options
| author | Chris Larson <chris_larson@mentor.com> | 2010-09-08 11:31:36 -0700 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:34 +0000 |
| commit | a4b195f18009d131cb8d4c67beea4568c17c68c9 (patch) | |
| tree | 8fb0451d67951a768d71284b25783c19779b9a1c | |
| parent | 9c2bcae35eb7c2a58cef2e2923019de4a4017922 (diff) | |
| download | poky-a4b195f18009d131cb8d4c67beea4568c17c68c9.tar.gz | |
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>
| -rw-r--r-- | bitbake/lib/bb/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 11983f0e0e..3f00a8ee59 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
| @@ -29,7 +29,6 @@ if sys.version_info < (2, 6, 0): | |||
| 29 | 29 | ||
| 30 | import os | 30 | import os |
| 31 | import logging | 31 | import logging |
| 32 | import bb.msg | ||
| 33 | 32 | ||
| 34 | class NullHandler(logging.Handler): | 33 | class NullHandler(logging.Handler): |
| 35 | def emit(self, record): | 34 | def emit(self, record): |
| @@ -58,6 +57,10 @@ logger = logging.getLogger("BitBake") | |||
| 58 | logger.addHandler(NullHandler()) | 57 | logger.addHandler(NullHandler()) |
| 59 | logger.setLevel(logging.INFO) | 58 | logger.setLevel(logging.INFO) |
| 60 | 59 | ||
| 60 | # This has to be imported after the setLoggerClass, as the import of bb.msg | ||
| 61 | # can result in construction of the various loggers. | ||
| 62 | import bb.msg | ||
| 63 | |||
| 61 | if "BBDEBUG" in os.environ: | 64 | if "BBDEBUG" in os.environ: |
| 62 | level = int(os.environ["BBDEBUG"]) | 65 | level = int(os.environ["BBDEBUG"]) |
| 63 | if level: | 66 | if level: |
