diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-06-10 10:35:31 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:33 +0000 |
commit | ecc68fa4fbb579e97ea45156e79a293b073697a0 (patch) | |
tree | 6d08682e43476e37ccf48ee14c8d81e208d1c897 /bitbake/bin | |
parent | d3a45c7d41a88d79389fc40eb68816e4939fb6f9 (diff) | |
download | 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-x | bitbake/bin/bitbake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index a80c01ca50..470e9dcc43 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -57,23 +57,23 @@ class BBConfiguration(object): | |||
57 | self.pkgs_to_build = [] | 57 | self.pkgs_to_build = [] |
58 | 58 | ||
59 | 59 | ||
60 | def print_exception(exc, value, tb): | 60 | def print_exception(*exc_info): |
61 | """Send exception information through bb.msg""" | 61 | logger.error("Uncaught exception: ", exc_info=exc_info) |
62 | bb.fatal("".join(format_exception(exc, value, tb, limit=8))) | 62 | sys.exit(1) |
63 | 63 | ||
64 | sys.excepthook = print_exception | 64 | sys.excepthook = print_exception |
65 | 65 | ||
66 | 66 | ||
67 | # Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others""" | ||
68 | warnlog = logging.getLogger("BitBake.Warnings") | ||
67 | _warnings_showwarning = warnings.showwarning | 69 | _warnings_showwarning = warnings.showwarning |
68 | def _showwarning(message, category, filename, lineno, file=None, line=None): | 70 | def _showwarning(message, category, filename, lineno, file=None, line=None): |
69 | """Display python warning messages using bb.msg""" | ||
70 | if file is not None: | 71 | if file is not None: |
71 | if _warnings_showwarning is not None: | 72 | if _warnings_showwarning is not None: |
72 | _warnings_showwarning(message, category, filename, lineno, file, line) | 73 | _warnings_showwarning(message, category, filename, lineno, file, line) |
73 | else: | 74 | else: |
74 | s = warnings.formatwarning(message, category, filename, lineno) | 75 | s = warnings.formatwarning(message, category, filename, lineno) |
75 | s = s.split("\n")[0] | 76 | warnlog.warn(s) |
76 | bb.msg.warn(None, s) | ||
77 | 77 | ||
78 | warnings.showwarning = _showwarning | 78 | warnings.showwarning = _showwarning |
79 | warnings.filterwarnings("ignore") | 79 | warnings.filterwarnings("ignore") |