diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-24 14:45:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-11-24 22:02:01 +0000 |
commit | a34ff490a46577a64345365fa1ac39c48d0861cd (patch) | |
tree | dfdb622e44f57953a95f220f3a3d1918a59bb0e4 | |
parent | 035c673c463ca450245acf824e7b7e8f889bdc89 (diff) | |
download | bitbake-a34ff490a46577a64345365fa1ac39c48d0861cd.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]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/ui/knotty.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index 7c645adcc..38acb4743 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"]) |