summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/event.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-01-10 09:20:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 22:09:11 +0000
commit810e139fd3626acdf23372426526bceb7ccb1abf (patch)
treed899760cf06b5acdc68cce509e08e09d8c0874d7 /bitbake/lib/bb/event.py
parent48e567bb477ad468dcfbab0d97019a6a85520ede (diff)
downloadpoky-810e139fd3626acdf23372426526bceb7ccb1abf.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. (Bitbake rev: 0153ace246e7c88366f45c8f035a2b4505a1c115) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r--bitbake/lib/bb/event.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 450d913633..bd2042a99c 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -384,3 +384,7 @@ class LogHandler(logging.Handler):
384 fire(record, None) 384 fire(record, None)
385 if bb.event.useStdout: 385 if bb.event.useStdout:
386 print(self.format(record)) 386 print(self.format(record))
387
388 def filter(self, record):
389 record.taskpid = worker_pid
390 return True