summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-03-12 12:44:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-21 00:00:23 +0000
commita273d8f1510a8a711e5f2b28b51f058cffd4bff7 (patch)
treecb421d9018506afef0b7bf54ce691aac2e00a2e0 /bitbake/lib/bb/ui/toasterui.py
parentc5e9654ac908537ad0b14e0804be312e7c6f5be8 (diff)
downloadpoky-a273d8f1510a8a711e5f2b28b51f058cffd4bff7.tar.gz
poky-a273d8f1510a8a711e5f2b28b51f058cffd4bff7.tar.bz2
poky-a273d8f1510a8a711e5f2b28b51f058cffd4bff7.zip
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.py8
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 ):
except Exception as e:
# print errors to log
import traceback
+ from pprint import pformat
exception_data = traceback.format_exc()
logger.error("%s\n%s" % (e, exception_data))
+ exc_type, exc_value, tb = sys.exc_info()
+ if tb is not None:
+ curr = tb
+ while curr is not None:
+ logger.warn("Error data dump %s\n%s\n" % (traceback.format_tb(curr,1), pformat(curr.tb_frame.f_locals)))
+ curr = curr.tb_next
+
# save them to database, if possible; if it fails, we already logged to console.
try:
buildinfohelper.store_log_exception("%s\n%s" % (str(e), exception_data))