summaryrefslogtreecommitdiffstats
path: root/lib/bb/event.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-01-10 09:20:50 -0700
committerChris Larson <chris_larson@mentor.com>2011-01-10 11:55:49 -0700
commit0153ace246e7c88366f45c8f035a2b4505a1c115 (patch)
treef9bbcc1eb4cbf5d49bd9e43dc2e5ebf8a42b7423 /lib/bb/event.py
parentde2518ab761d4c1a37d1d5d1d2224b0451e84e5f (diff)
downloadbitbake-0153ace246e7c88366f45c8f035a2b4505a1c115.tar.gz
Inject taskpid into log records via our log handler
It turns out that while log filters added with addFilter are only associated with that logger, and not its children, handlers are inherited, and handlers can be filters. So, let's add filtering to our existing LogHandler class which dispatches our log records as bitbake events. Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/event.py')
-rw-r--r--lib/bb/event.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/event.py b/lib/bb/event.py
index 5a58aee67..c22a5910b 100644
--- a/lib/bb/event.py
+++ b/lib/bb/event.py
@@ -380,3 +380,7 @@ class LogHandler(logging.Handler):
def emit(self, record):
fire(record, None)
+
+ def filter(self, record):
+ record.taskpid = worker_pid
+ return True