diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-03-12 12:44:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-03-21 00:00:23 +0000 |
commit | a273d8f1510a8a711e5f2b28b51f058cffd4bff7 (patch) | |
tree | cb421d9018506afef0b7bf54ce691aac2e00a2e0 /bitbake/lib/bb/ui/toasterui.py | |
parent | c5e9654ac908537ad0b14e0804be312e7c6f5be8 (diff) | |
download | poky-a273d8f1510a8a711e5f2b28b51f058cffd4bff7.tar.gz |
bitbake: toasterui: improve info in the toaster_ui.log
We improve logging and signalling of errors in the
toaster_ui.log to facilitate debugging on remote systems.
(Bitbake rev: 3cd248f99b90367bd41aab81e255fc1912434890)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index df9f362284..db119cea67 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
@@ -327,9 +327,17 @@ def main(server, eventHandler, params ): | |||
327 | except Exception as e: | 327 | except Exception as e: |
328 | # print errors to log | 328 | # print errors to log |
329 | import traceback | 329 | import traceback |
330 | from pprint import pformat | ||
330 | exception_data = traceback.format_exc() | 331 | exception_data = traceback.format_exc() |
331 | logger.error("%s\n%s" % (e, exception_data)) | 332 | logger.error("%s\n%s" % (e, exception_data)) |
332 | 333 | ||
334 | exc_type, exc_value, tb = sys.exc_info() | ||
335 | if tb is not None: | ||
336 | curr = tb | ||
337 | while curr is not None: | ||
338 | logger.warn("Error data dump %s\n%s\n" % (traceback.format_tb(curr,1), pformat(curr.tb_frame.f_locals))) | ||
339 | curr = curr.tb_next | ||
340 | |||
333 | # save them to database, if possible; if it fails, we already logged to console. | 341 | # save them to database, if possible; if it fails, we already logged to console. |
334 | try: | 342 | try: |
335 | buildinfohelper.store_log_exception("%s\n%s" % (str(e), exception_data)) | 343 | buildinfohelper.store_log_exception("%s\n%s" % (str(e), exception_data)) |