summaryrefslogtreecommitdiffstats
path: root/lib/bb/__init__.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-09 16:17:29 -0700
committerChris Larson <chris_larson@mentor.com>2010-08-27 11:38:19 -0700
commit47ca82397bc395b598c6b68b24cdee9e0d8a76d8 (patch)
tree751db52d65e175260ecb06fcce150eaae9663cf7 /lib/bb/__init__.py
parentf7c181a0f6ab0b4d33bf80a0e24a788de441f82b (diff)
downloadbitbake-47ca82397bc395b598c6b68b24cdee9e0d8a76d8.tar.gz
Use the python logging module under the hood for bb.msg
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/__init__.py')
-rw-r--r--lib/bb/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index 88adfc1df..8cda4255b 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -28,8 +28,18 @@ if sys.version_info < (2, 6, 0):
raise RuntimeError("Sorry, python 2.6.0 or later is required for this version of bitbake")
import os
+import logging
import bb.msg
+class NullHandler(logging.Handler):
+ def emit(self, record):
+ pass
+
+logging.raiseExceptions = False
+logger = logging.getLogger("BitBake")
+logger.addHandler(NullHandler())
+logger.setLevel(logging.INFO)
+
if "BBDEBUG" in os.environ:
level = int(os.environ["BBDEBUG"])
if level: