summaryrefslogtreecommitdiffstats
path: root/lib/bb/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bb/__init__.py')
-rw-r--r--lib/bb/__init__.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index b21773734..99e57a02e 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -21,8 +21,8 @@ class BBHandledException(Exception):
The big dilemma for generic bitbake code is what information to give the user
when an exception occurs. Any exception inheriting this base exception class
has already provided information to the user via some 'fired' message type such as
- an explicitly fired event using bb.fire, or a bb.error message. If bitbake
- encounters an exception derived from this class, no backtrace or other information
+ an explicitly fired event using bb.fire, or a bb.error message. If bitbake
+ encounters an exception derived from this class, no backtrace or other information
will be given to the user, its assumed the earlier event provided the relevant information.
"""
pass
@@ -42,7 +42,16 @@ class BBLoggerMixin(object):
def setup_bblogger(self, name):
if name.split(".")[0] == "BitBake":
- self.debug = self.bbdebug
+ self.debug = self._debug_helper
+
+ def _debug_helper(self, *args, **kwargs):
+ return self.bbdebug(1, *args, **kwargs)
+
+ def debug2(self, *args, **kwargs):
+ return self.bbdebug(2, *args, **kwargs)
+
+ def debug3(self, *args, **kwargs):
+ return self.bbdebug(3, *args, **kwargs)
def bbdebug(self, level, msg, *args, **kwargs):
loglevel = logging.DEBUG - level + 1
@@ -128,7 +137,7 @@ def debug(lvl, *args):
mainlogger.warning("Passed invalid debug level '%s' to bb.debug", lvl)
args = (lvl,) + args
lvl = 1
- mainlogger.debug(lvl, ''.join(args))
+ mainlogger.bbdebug(lvl, ''.join(args))
def note(*args):
mainlogger.info(''.join(args))