Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH] knotty: Add support for logging the console to logfile
@ 2011-11-24 14:47 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2011-11-24 14:47 UTC (permalink / raw)
  To: bitbake-devel

The BB_CONSOLELOG variable is used to specify the console log file
to use. This means people can look up things that happened during a
build by may have scrolled off the screen.
    
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 7c645ad..38acb47 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -69,6 +69,7 @@ def main(server, eventHandler):
     # Get values of variables which control our output
     includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
     loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
+    consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"])
 
     helper = uihelper.BBUIHelper()
 
@@ -77,6 +78,11 @@ def main(server, eventHandler):
     bb.msg.addDefaultlogFilter(console)
     console.setFormatter(format)
     logger.addHandler(console)
+    if consolelogfile:
+        consolelog = logging.FileHandler(consolelogfile)
+        bb.msg.addDefaultlogFilter(consolelog)
+        consolelog.setFormatter(format)
+        logger.addHandler(consolelog)
 
     try:
         cmdline = server.runCommand(["getCmdLineAction"])




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-24 14:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 14:47 [PATCH] knotty: Add support for logging the console to logfile Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox