summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-01-20 09:39:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-18 10:24:06 +0000
commitd086fa3aed34a05d52e73c255ca22379149a64a1 (patch)
treec55f38b6b86b513c0d4b47a01fed47c9db1cb163 /bitbake/lib/bb/ui/toasterui.py
parentf99f2cdd69f1015953a7e9ab07af46dd63e50ad4 (diff)
downloadpoky-d086fa3aed34a05d52e73c255ca22379149a64a1.tar.gz
bitbake: toasterui: add extra debug and development infos
We update and add logs throughout the code in order to help with development. The extra logging is turned off by default, but it can be enabled by using environment variables. All logging happens through the Python logging facilities. The toaster UI will save a log of all incoming events if the TOASTER_EVENTLOG variable is set. If TOASTER_SQLDEBUG is set all DB queries will be logged. If TOASTER_DEVEL is set and the django-fresh module is available, the module is enabled to allow auto-reload of pages when the source is changed. (Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060) 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.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py
index 9aff489c1d..7a316be57c 100644
--- a/bitbake/lib/bb/ui/toasterui.py
+++ b/bitbake/lib/bb/ui/toasterui.py
@@ -62,15 +62,6 @@ def _log_settings_from_server(server):
62 62
63def main(server, eventHandler, params ): 63def main(server, eventHandler, params ):
64 64
65 includelogs, loglines = _log_settings_from_server(server)
66
67 # verify and warn
68 build_history_enabled = True
69 inheritlist, error = server.runCommand(["getVariable", "INHERIT"])
70 if not "buildhistory" in inheritlist.split(" "):
71 logger.warn("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.")
72 build_history_enabled = False
73
74 helper = uihelper.BBUIHelper() 65 helper = uihelper.BBUIHelper()
75 66
76 console = logging.StreamHandler(sys.stdout) 67 console = logging.StreamHandler(sys.stdout)
@@ -80,6 +71,16 @@ def main(server, eventHandler, params ):
80 console.setFormatter(format) 71 console.setFormatter(format)
81 logger.addHandler(console) 72 logger.addHandler(console)
82 73
74 includelogs, loglines = _log_settings_from_server(server)
75
76 # verify and warn
77 build_history_enabled = True
78 inheritlist, error = server.runCommand(["getVariable", "INHERIT"])
79
80 if not "buildhistory" in inheritlist.split(" "):
81 logger.warn("buildhistory is not enabled. Please enable INHERIT += \"buildhistory\" to see image details.")
82 build_history_enabled = False
83
83 if not params.observe_only: 84 if not params.observe_only:
84 logger.error("ToasterUI can only work in observer mode") 85 logger.error("ToasterUI can only work in observer mode")
85 return 86 return