summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/build.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-12-13 10:53:51 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-14 12:25:07 +0000
commitc61b525e9190d1f6e18c3d7fc16736c075317b1d (patch)
tree527e68f60ce952d5fc5aae1d813db4e929c314bd /bitbake/lib/bb/build.py
parent6688f6a115f3e8ab9022a58f5aec18dc7ece8c5f (diff)
downloadpoky-c61b525e9190d1f6e18c3d7fc16736c075317b1d.tar.gz
bitbake: lib/bb/build: enable access to logger within tasks
In certain circumstances it can be useful to get access to BitBake's logger within a task; the main example is in OpenEmbedded's image construction code where we want to be able to check the log file for errors and warnings, but we don't want to see any errors or warnings that were emitted through the logger; so we need a way to exclude those. In order to do this, pass the logger object into the task via a BB_TASK_LOGGER variable, and add a logging handler class to bb.utils that can be added to it in order to keep a list of warnings/errors that have been emitted. (Bitbake rev: f1cd6fab604f14d8686b1d783cbfe012d923ee42) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/build.py')
-rw-r--r--bitbake/lib/bb/build.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 7a7aabb853..0c2c1ba126 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -562,6 +562,7 @@ def _exec_task(fn, task, d, quieterr):
562 562
563 localdata.setVar('BB_LOGFILE', logfn) 563 localdata.setVar('BB_LOGFILE', logfn)
564 localdata.setVar('BB_RUNTASK', task) 564 localdata.setVar('BB_RUNTASK', task)
565 localdata.setVar('BB_TASK_LOGGER', bblogger)
565 566
566 flags = localdata.getVarFlags(task) 567 flags = localdata.getVarFlags(task)
567 568