diff options
| -rw-r--r-- | bitbake/lib/bb/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index 3f00a8ee59..f8577c6794 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
| @@ -29,6 +29,7 @@ if sys.version_info < (2, 6, 0): | |||
| 29 | 29 | ||
| 30 | import os | 30 | import os |
| 31 | import logging | 31 | import logging |
| 32 | import traceback | ||
| 32 | 33 | ||
| 33 | class NullHandler(logging.Handler): | 34 | class NullHandler(logging.Handler): |
| 34 | def emit(self, record): | 35 | def emit(self, record): |
| @@ -50,6 +51,9 @@ class BBLogger(Logger): | |||
| 50 | def verbose(self, msg, *args, **kwargs): | 51 | def verbose(self, msg, *args, **kwargs): |
| 51 | return self.log(logging.INFO - 1, msg, *args, **kwargs) | 52 | return self.log(logging.INFO - 1, msg, *args, **kwargs) |
| 52 | 53 | ||
| 54 | def exception(self, msg, *args, **kwargs): | ||
| 55 | return self.critical("%s\n%s" % (msg, traceback.format_exc()), *args, **kwargs) | ||
| 56 | |||
| 53 | logging.raiseExceptions = False | 57 | logging.raiseExceptions = False |
| 54 | logging.setLoggerClass(BBLogger) | 58 | logging.setLoggerClass(BBLogger) |
| 55 | 59 | ||
