aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <JPEWhacker@gmail.com>2021-04-29 20:04:13 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-01 22:50:59 +0100
commit005fc7a8c588d0b0bca382469645cbf481ad8e30 (patch)
tree34f3de1492bbd9729f8573022ee6b6edd01a848d
parent90d31b2d5a81e5f41fe95907c78fd2f5f36e39ee (diff)
downloadbitbake-005fc7a8c588d0b0bca382469645cbf481ad8e30.tar.gz
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. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/ui/knotty.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 0efa614df..65ff2727d 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -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():