summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-24 14:45:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-24 22:11:44 +0000
commit2d8e5349a3dec405e005dc249d1412bad5a5977b (patch)
tree67b038e1bb63d4b2483a33c2cf2fe3ad7c73e1dc /bitbake/lib/bb/ui
parentddd3f56ded66622cbee0e394947803e80ddebf65 (diff)
downloadpoky-2d8e5349a3dec405e005dc249d1412bad5a5977b.tar.gz
knotty: Add support for logging the console to logfile
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. [YOCTO #1771] (Bitbake rev: a34ff490a46577a64345365fa1ac39c48d0861cd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/knotty.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 7c645adcc4..38acb4743a 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -69,6 +69,7 @@ def main(server, eventHandler):
69 # Get values of variables which control our output 69 # Get values of variables which control our output
70 includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"]) 70 includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
71 loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"]) 71 loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
72 consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"])
72 73
73 helper = uihelper.BBUIHelper() 74 helper = uihelper.BBUIHelper()
74 75
@@ -77,6 +78,11 @@ def main(server, eventHandler):
77 bb.msg.addDefaultlogFilter(console) 78 bb.msg.addDefaultlogFilter(console)
78 console.setFormatter(format) 79 console.setFormatter(format)
79 logger.addHandler(console) 80 logger.addHandler(console)
81 if consolelogfile:
82 consolelog = logging.FileHandler(consolelogfile)
83 bb.msg.addDefaultlogFilter(consolelog)
84 consolelog.setFormatter(format)
85 logger.addHandler(consolelog)
80 86
81 try: 87 try:
82 cmdline = server.runCommand(["getCmdLineAction"]) 88 cmdline = server.runCommand(["getCmdLineAction"])