aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-29 09:41:47 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-28 23:07:15 +0100
commit968a77388dd1a24c1dadec6ce49bf53ebb5b643f (patch)
tree29a3958ebcc1722b114cea319c0948c741af1b64 /lib/bb
parentb8b14d975a254444461ba857fc6fb8c725de8874 (diff)
downloadbitbake-968a77388dd1a24c1dadec6ce49bf53ebb5b643f.tar.gz
lib/bb/codeparser: ensure BufferedLogger respects target logging level
BufferedLogger was sending log records to the target logger without checking if the logger is enabled for the level of the record - and handle() doesn't check this either (it's normally checked earlier when the relevant log function is called e.g. logger.debug()), leading for example to debug messages from codeparser getting printed when the log level for the main BitBake logger was set to logging.WARNING. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r--lib/bb/codeparser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py
index 5d2d44065..89d24ab49 100644
--- a/lib/bb/codeparser.py
+++ b/lib/bb/codeparser.py
@@ -186,7 +186,8 @@ class BufferedLogger(Logger):
def flush(self):
for record in self.buffer:
- self.target.handle(record)
+ if self.target.isEnabledFor(record.levelno):
+ self.target.handle(record)
self.buffer = []
class PythonParser():