summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py
index 3f00a8ee5..f8577c679 100644
--- a/bitbake/lib/bb/__init__.py
+++ b/bitbake/lib/bb/__init__.py
@@ -29,6 +29,7 @@ if sys.version_info < (2, 6, 0):
import os
import logging
+import traceback
class NullHandler(logging.Handler):
def emit(self, record):
@@ -50,6 +51,9 @@ class BBLogger(Logger):
def verbose(self, msg, *args, **kwargs):
return self.log(logging.INFO - 1, msg, *args, **kwargs)
+ def exception(self, msg, *args, **kwargs):
+ return self.critical("%s\n%s" % (msg, traceback.format_exc()), *args, **kwargs)
+
logging.raiseExceptions = False
logging.setLoggerClass(BBLogger)