summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-10 10:35:31 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:33 +0000
commitecc68fa4fbb579e97ea45156e79a293b073697a0 (patch)
tree6d08682e43476e37ccf48ee14c8d81e208d1c897 /bitbake/bin
parentd3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff)
downloadast2050-yocto-poky-ecc68fa4fbb579e97ea45156e79a293b073697a0.zip
ast2050-yocto-poky-ecc68fa4fbb579e97ea45156e79a293b073697a0.tar.gz
Switch bitbake internals to use logging directly rather than bb.msg
We use a custom Logger subclass for our loggers This logger provides: - 'debug' method which accepts a debug level - 'plain' method which bypasses log formatting - 'verbose' method which is more detail than info, but less than debug (Bitbake rev: 3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index a80c01c..470e9dc 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -57,23 +57,23 @@ class BBConfiguration(object):
self.pkgs_to_build = []
-def print_exception(exc, value, tb):
- """Send exception information through bb.msg"""
- bb.fatal("".join(format_exception(exc, value, tb, limit=8)))
+def print_exception(*exc_info):
+ logger.error("Uncaught exception: ", exc_info=exc_info)
+ sys.exit(1)
sys.excepthook = print_exception
+# Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others"""
+warnlog = logging.getLogger("BitBake.Warnings")
_warnings_showwarning = warnings.showwarning
def _showwarning(message, category, filename, lineno, file=None, line=None):
- """Display python warning messages using bb.msg"""
if file is not None:
if _warnings_showwarning is not None:
_warnings_showwarning(message, category, filename, lineno, file, line)
else:
s = warnings.formatwarning(message, category, filename, lineno)
- s = s.split("\n")[0]
- bb.msg.warn(None, s)
+ warnlog.warn(s)
warnings.showwarning = _showwarning
warnings.filterwarnings("ignore")
OpenPOWER on IntegriCloud