summaryrefslogtreecommitdiffstats
path: root/lib/bb/__init__.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-02-08 13:41:36 -0700
committerChris Larson <chris_larson@mentor.com>2011-02-08 13:42:19 -0700
commit3539c9474a0b53f57e614544c70a7197ecdfb130 (patch)
tree9c89416a0bdd10417af836fd02dbada2be2a381d /lib/bb/__init__.py
parentd93fcbd64ab5d806288424170f55323b4297e7d6 (diff)
downloadbitbake-3539c9474a0b53f57e614544c70a7197ecdfb130.tar.gz
Shift traceback pre-formatting into LogHandler
It's cleaner to leave it behaving as usual, passing the exception data in the exc_info attribute of the LogRecord where it normally lies, and then let LogHandler make it pickleable so it can be sent to the UI. Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/__init__.py')
-rw-r--r--lib/bb/__init__.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/bb/__init__.py b/lib/bb/__init__.py
index 572d5b31c..704511089 100644
--- a/lib/bb/__init__.py
+++ b/lib/bb/__init__.py
@@ -29,7 +29,7 @@ if sys.version_info < (2, 6, 0):
import os
import logging
-import traceback
+
class NullHandler(logging.Handler):
def emit(self, record):
@@ -51,9 +51,6 @@ 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)