summaryrefslogtreecommitdiffstats
path: root/lib/bb/build.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-24 12:28:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-24 17:47:15 +0100
commit423c046f2173aaff3072dc3d0882d01b8a0b0212 (patch)
tree7abb4cb19b9f36719613c1681966e5206097f366 /lib/bb/build.py
parentab2ef942dc21f9639793c972f2e546edf9444783 (diff)
downloadbitbake-423c046f2173aaff3072dc3d0882d01b8a0b0212.tar.gz
build/msg: Cleanup verbose option handling
The levels of indirection to set these verbose logging options is rather crazy. This attempts to turn things into two specific options with much more specific meanings. For now its all still controlled by the commandline verbose option and should funciton as previously, with the addition that the BB_VERBOSE_LOGS option can now be task specific. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r--lib/bb/build.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py
index 94f9cb371..974d2ff06 100644
--- a/lib/bb/build.py
+++ b/lib/bb/build.py
@@ -29,6 +29,9 @@ from bb import data, event, utils
bblogger = logging.getLogger('BitBake')
logger = logging.getLogger('BitBake.Build')
+verboseShellLogging = False
+verboseStdoutLogging = False
+
__mtime_cache = {}
def cached_mtime_noerror(f):
@@ -413,7 +416,7 @@ def exec_func_shell(func, d, runfile, cwd=None):
bb.data.emit_func(func, script, d)
- if bb.msg.loggerVerboseLogs:
+ if verboseShellLogging or bb.utils.to_boolean(d.getVar("BB_VERBOSE_LOGS", False)):
script.write("set -x\n")
if cwd:
script.write("cd '%s'\n" % cwd)
@@ -433,7 +436,7 @@ exit $ret
if fakerootcmd:
cmd = [fakerootcmd, runfile]
- if bb.msg.loggerDefaultVerbose:
+ if verboseStdoutLogging:
logfile = LogTee(logger, StdoutNoopContextManager())
else:
logfile = StdoutNoopContextManager()