bitbake: implement BB_VERBOSE_LOGS
Enable configuring whether "set +x" is added to all shell tasks rather than forcing it; this is enabled by setting BB_VERBOSE_LOGS to 1. (Bitbake rev: 659411b6bb30e1a8355afc1c29b8170a8f2b55ac) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
8fbdf5faa6
commit
0e39107047
|
@ -229,7 +229,8 @@ def exec_func_shell(function, d, runfile, cwd=None):
|
|||
script.write('#!/bin/sh -e\n')
|
||||
data.emit_func(function, script, d)
|
||||
|
||||
script.write("set -x\n")
|
||||
if bb.msg.loggerVerboseLogs:
|
||||
script.write("set -x\n")
|
||||
if cwd:
|
||||
script.write("cd %s\n" % cwd)
|
||||
script.write("%s\n" % function)
|
||||
|
|
|
@ -206,6 +206,10 @@ class BBCooker:
|
|||
|
||||
def parseConfiguration(self):
|
||||
|
||||
# Set log file verbosity
|
||||
verboselogs = bb.utils.to_boolean(self.configuration.data.getVar("BB_VERBOSE_LOGS", "0"))
|
||||
if verboselogs:
|
||||
bb.msg.loggerVerboseLogs = True
|
||||
|
||||
# Change nice level if we're asked to
|
||||
nice = self.configuration.data.getVar("BB_NICE_LEVEL", True)
|
||||
|
|
|
@ -100,6 +100,7 @@ class BBLogFilter(object):
|
|||
|
||||
loggerDefaultDebugLevel = 0
|
||||
loggerDefaultVerbose = False
|
||||
loggerVerboseLogs = False
|
||||
loggerDefaultDomains = []
|
||||
|
||||
def init_msgconfig(verbose, debug, debug_domains = []):
|
||||
|
@ -108,6 +109,8 @@ def init_msgconfig(verbose, debug, debug_domains = []):
|
|||
"""
|
||||
bb.msg.loggerDefaultDebugLevel = debug
|
||||
bb.msg.loggerDefaultVerbose = verbose
|
||||
if verbose:
|
||||
bb.msg.loggerVerboseLogs = True
|
||||
bb.msg.loggerDefaultDomains = debug_domains
|
||||
|
||||
def addDefaultlogFilter(handler):
|
||||
|
|
Loading…
Reference in New Issue