[gnome-continuous-yocto/gnomeostree-3.28-rocko: 5366/8267] bitbake: lib/bb/codeparser: ensure BufferedLogger respects target logging level
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 5366/8267] bitbake: lib/bb/codeparser: ensure BufferedLogger respects target logging level
- Date: Sun, 17 Dec 2017 03:20:22 +0000 (UTC)
commit 8b1826e78a0dae1ffea84ec5128130d524ecf4b4
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Wed Mar 29 09:41:47 2017 +1300
bitbake: 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.
(Bitbake rev: 968a77388dd1a24c1dadec6ce49bf53ebb5b643f)
Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/codeparser.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index 5d2d440..89d24ab 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/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():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]