diff options
author | Joshua Watt <JPEWhacker@gmail.com> | 2021-04-29 20:04:13 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-05-01 22:51:06 +0100 |
commit | f3e1a668fbe72551ec73d3f2e610390358665b1e (patch) | |
tree | ea42ccd1e559e41b560090013af129a31207e2b1 | |
parent | 6da327c788b5fc2f50897771eeb82de1cc08e4e7 (diff) | |
download | poky-f3e1a668fbe72551ec73d3f2e610390358665b1e.tar.gz |
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>
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 0efa614dfc..65ff2727dc 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -21,6 +21,7 @@ import fcntl | |||
21 | import struct | 21 | import struct |
22 | import copy | 22 | import copy |
23 | import atexit | 23 | import atexit |
24 | from itertools import groupby | ||
24 | 25 | ||
25 | from bb.ui import uihelper | 26 | from bb.ui import uihelper |
26 | 27 | ||
@@ -539,6 +540,13 @@ def main(server, eventHandler, params, tf = TerminalFilter): | |||
539 | except OSError: | 540 | except OSError: |
540 | pass | 541 | pass |
541 | 542 | ||
543 | # Add the logging domains specified by the user on the command line | ||
544 | for (domainarg, iterator) in groupby(params.debug_domains): | ||
545 | dlevel = len(tuple(iterator)) | ||
546 | l = logconfig["loggers"].setdefault("BitBake.%s" % domainarg, {}) | ||
547 | l["level"] = logging.DEBUG - dlevel + 1 | ||
548 | l.setdefault("handlers", []).extend(["BitBake.verbconsole"]) | ||
549 | |||
542 | conf = bb.msg.setLoggingConfig(logconfig, logconfigfile) | 550 | conf = bb.msg.setLoggingConfig(logconfig, logconfigfile) |
543 | 551 | ||
544 | if sys.stdin.isatty() and sys.stdout.isatty(): | 552 | if sys.stdin.isatty() and sys.stdout.isatty(): |