mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 00:32:13 +02:00
bitbake: knotty: Re-enable command line logging levels
The "-l" command line options to enable specific logging domains wasn't working with the switch to structured logging because they were only being used to set the legacy logging domains. Fix this by implementing the logic to parse the user options into the logging configuration. (Bitbake rev: 005fc7a8c588d0b0bca382469645cbf481ad8e30) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6da327c788
commit
f3e1a668fb
@@ -21,6 +21,7 @@ import fcntl
|
||||
import struct
|
||||
import copy
|
||||
import atexit
|
||||
from itertools import groupby
|
||||
|
||||
from bb.ui import uihelper
|
||||
|
||||
@@ -539,6 +540,13 @@ def main(server, eventHandler, params, tf = TerminalFilter):
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# Add the logging domains specified by the user on the command line
|
||||
for (domainarg, iterator) in groupby(params.debug_domains):
|
||||
dlevel = len(tuple(iterator))
|
||||
l = logconfig["loggers"].setdefault("BitBake.%s" % domainarg, {})
|
||||
l["level"] = logging.DEBUG - dlevel + 1
|
||||
l.setdefault("handlers", []).extend(["BitBake.verbconsole"])
|
||||
|
||||
conf = bb.msg.setLoggingConfig(logconfig, logconfigfile)
|
||||
|
||||
if sys.stdin.isatty() and sys.stdout.isatty():
|
||||
|
||||
Reference in New Issue
Block a user