]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bb.ui.knotty: prefix task messages with recipe/task
authorChristopher Larson <chris_larson@mentor.com>
Fri, 12 Feb 2016 00:13:36 +0000 (17:13 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 16 Feb 2016 09:04:06 +0000 (09:04 +0000)
An example prefix: `perl-5.22.1-r0 do_compile:`

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/knotty.py

index a7521ee827a957bee025080649dbf3e7b388b6ea..dff92bce913a597427bc6aced5e5c1e725e0d06b 100644 (file)
@@ -359,11 +359,19 @@ def main(server, eventHandler, params, tf = TerminalFilter):
                     return_value = 1
                 elif event.levelno == format.WARNING:
                     warnings = warnings + 1
-                # For "normal" logging conditions, don't show note logs from tasks
-                # but do show them if the user has changed the default log level to
-                # include verbose/debug messages
-                if event.taskpid != 0 and event.levelno <= format.NOTE and (event.levelno < llevel or (event.levelno == format.NOTE and llevel != format.VERBOSE)):
-                    continue
+
+                if event.taskpid != 0:
+                    # For "normal" logging conditions, don't show note logs from tasks
+                    # but do show them if the user has changed the default log level to
+                    # include verbose/debug messages
+                    if event.levelno <= format.NOTE and (event.levelno < llevel or (event.levelno == format.NOTE and llevel != format.VERBOSE)):
+                        continue
+
+                    # Prefix task messages with recipe/task
+                    if event.taskpid in helper.running_tasks:
+                        taskinfo = helper.running_tasks[event.taskpid]
+                        event.msg = taskinfo['title'] + ': ' + event.msg
+
                 logger.handle(event)
                 continue