summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/build.py1
-rw-r--r--bitbake/lib/bb/utils.py11
2 files changed, 12 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
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 9073f15ea2..a22a05e241 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -1503,3 +1503,14 @@ def load_plugins(logger, plugins, pluginpath):
1503 plugins.append(obj or plugin) 1503 plugins.append(obj or plugin)
1504 else: 1504 else:
1505 plugins.append(plugin) 1505 plugins.append(plugin)
1506
1507
1508class LogCatcher(logging.Handler):
1509 """Logging handler for collecting logged messages so you can check them later"""
1510 def __init__(self):
1511 self.messages = []
1512 logging.Handler.__init__(self, logging.WARNING)
1513 def emit(self, record):
1514 self.messages.append(bb.build.logformatter.format(record))
1515 def contains(self, message):
1516 return (message in self.messages)