mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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>
This commit is contained in:
@@ -69,6 +69,7 @@ def main(server, eventHandler):
|
|||||||
# Get values of variables which control our output
|
# Get values of variables which control our output
|
||||||
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
|
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
|
||||||
loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
|
loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
|
||||||
|
consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"])
|
||||||
|
|
||||||
helper = uihelper.BBUIHelper()
|
helper = uihelper.BBUIHelper()
|
||||||
|
|
||||||
@@ -77,6 +78,11 @@ def main(server, eventHandler):
|
|||||||
bb.msg.addDefaultlogFilter(console)
|
bb.msg.addDefaultlogFilter(console)
|
||||||
console.setFormatter(format)
|
console.setFormatter(format)
|
||||||
logger.addHandler(console)
|
logger.addHandler(console)
|
||||||
|
if consolelogfile:
|
||||||
|
consolelog = logging.FileHandler(consolelogfile)
|
||||||
|
bb.msg.addDefaultlogFilter(consolelog)
|
||||||
|
consolelog.setFormatter(format)
|
||||||
|
logger.addHandler(consolelog)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cmdline = server.runCommand(["getCmdLineAction"])
|
cmdline = server.runCommand(["getCmdLineAction"])
|
||||||
|
|||||||
Reference in New Issue
Block a user