mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
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:
committed by
Richard Purdie
parent
8fbdf5faa6
commit
0e39107047
@@ -229,7 +229,8 @@ def exec_func_shell(function, d, runfile, cwd=None):
|
|||||||
script.write('#!/bin/sh -e\n')
|
script.write('#!/bin/sh -e\n')
|
||||||
data.emit_func(function, script, d)
|
data.emit_func(function, script, d)
|
||||||
|
|
||||||
script.write("set -x\n")
|
if bb.msg.loggerVerboseLogs:
|
||||||
|
script.write("set -x\n")
|
||||||
if cwd:
|
if cwd:
|
||||||
script.write("cd %s\n" % cwd)
|
script.write("cd %s\n" % cwd)
|
||||||
script.write("%s\n" % function)
|
script.write("%s\n" % function)
|
||||||
|
|||||||
@@ -206,6 +206,10 @@ class BBCooker:
|
|||||||
|
|
||||||
def parseConfiguration(self):
|
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
|
# Change nice level if we're asked to
|
||||||
nice = self.configuration.data.getVar("BB_NICE_LEVEL", True)
|
nice = self.configuration.data.getVar("BB_NICE_LEVEL", True)
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ class BBLogFilter(object):
|
|||||||
|
|
||||||
loggerDefaultDebugLevel = 0
|
loggerDefaultDebugLevel = 0
|
||||||
loggerDefaultVerbose = False
|
loggerDefaultVerbose = False
|
||||||
|
loggerVerboseLogs = False
|
||||||
loggerDefaultDomains = []
|
loggerDefaultDomains = []
|
||||||
|
|
||||||
def init_msgconfig(verbose, debug, debug_domains = []):
|
def init_msgconfig(verbose, debug, debug_domains = []):
|
||||||
@@ -108,6 +109,8 @@ def init_msgconfig(verbose, debug, debug_domains = []):
|
|||||||
"""
|
"""
|
||||||
bb.msg.loggerDefaultDebugLevel = debug
|
bb.msg.loggerDefaultDebugLevel = debug
|
||||||
bb.msg.loggerDefaultVerbose = verbose
|
bb.msg.loggerDefaultVerbose = verbose
|
||||||
|
if verbose:
|
||||||
|
bb.msg.loggerVerboseLogs = True
|
||||||
bb.msg.loggerDefaultDomains = debug_domains
|
bb.msg.loggerDefaultDomains = debug_domains
|
||||||
|
|
||||||
def addDefaultlogFilter(handler):
|
def addDefaultlogFilter(handler):
|
||||||
|
|||||||
Reference in New Issue
Block a user