[bitbake-devel] [RFC PATCH 1/1] bb.ui.knotty: prefix task messages with recipe/task

Christopher Larson kergoth at gmail.com
Fri Feb 12 00:13:36 UTC 2016


From: Christopher Larson <chris_larson at mentor.com>

An example prefix: `perl-5.22.1-r0 do_compile:`

Signed-off-by: Christopher Larson <chris_larson at mentor.com>
---
 lib/bb/ui/knotty.py | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index a8b968c..87e2a64 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -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
 
-- 
2.2.1




More information about the bitbake-devel mailing list