diff options
Diffstat (limited to 'bitbake/lib/bb/__init__.py')
-rw-r--r-- | bitbake/lib/bb/__init__.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index b217737347..99e57a02e4 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
@@ -21,8 +21,8 @@ class BBHandledException(Exception): | |||
21 | The big dilemma for generic bitbake code is what information to give the user | 21 | The big dilemma for generic bitbake code is what information to give the user |
22 | when an exception occurs. Any exception inheriting this base exception class | 22 | when an exception occurs. Any exception inheriting this base exception class |
23 | has already provided information to the user via some 'fired' message type such as | 23 | has already provided information to the user via some 'fired' message type such as |
24 | an explicitly fired event using bb.fire, or a bb.error message. If bitbake | 24 | an explicitly fired event using bb.fire, or a bb.error message. If bitbake |
25 | encounters an exception derived from this class, no backtrace or other information | 25 | encounters an exception derived from this class, no backtrace or other information |
26 | will be given to the user, its assumed the earlier event provided the relevant information. | 26 | will be given to the user, its assumed the earlier event provided the relevant information. |
27 | """ | 27 | """ |
28 | pass | 28 | pass |
@@ -42,7 +42,16 @@ class BBLoggerMixin(object): | |||
42 | 42 | ||
43 | def setup_bblogger(self, name): | 43 | def setup_bblogger(self, name): |
44 | if name.split(".")[0] == "BitBake": | 44 | if name.split(".")[0] == "BitBake": |
45 | self.debug = self.bbdebug | 45 | self.debug = self._debug_helper |
46 | |||
47 | def _debug_helper(self, *args, **kwargs): | ||
48 | return self.bbdebug(1, *args, **kwargs) | ||
49 | |||
50 | def debug2(self, *args, **kwargs): | ||
51 | return self.bbdebug(2, *args, **kwargs) | ||
52 | |||
53 | def debug3(self, *args, **kwargs): | ||
54 | return self.bbdebug(3, *args, **kwargs) | ||
46 | 55 | ||
47 | def bbdebug(self, level, msg, *args, **kwargs): | 56 | def bbdebug(self, level, msg, *args, **kwargs): |
48 | loglevel = logging.DEBUG - level + 1 | 57 | loglevel = logging.DEBUG - level + 1 |
@@ -128,7 +137,7 @@ def debug(lvl, *args): | |||
128 | mainlogger.warning("Passed invalid debug level '%s' to bb.debug", lvl) | 137 | mainlogger.warning("Passed invalid debug level '%s' to bb.debug", lvl) |
129 | args = (lvl,) + args | 138 | args = (lvl,) + args |
130 | lvl = 1 | 139 | lvl = 1 |
131 | mainlogger.debug(lvl, ''.join(args)) | 140 | mainlogger.bbdebug(lvl, ''.join(args)) |
132 | 141 | ||
133 | def note(*args): | 142 | def note(*args): |
134 | mainlogger.info(''.join(args)) | 143 | mainlogger.info(''.join(args)) |