Follow-up fix for tinfoil series
v2 cover Follow-up fix for tinfoil series
This resolves the minor regression that caused a few debug messages to get printed after recent bitbake commit 824e73e0f3eaa96b4d84da7e31f9a17ce5c5d7ee.
Changes since v1:
- It's not about filtering, and calling filter() just checks if the record should be filtered out or not (which handle() already does), we need to explicitly check whether the target logger is enabled for the level of the record. Thanks to Chris Larson for pointing this out.
The following changes since commit 921592026c69287cdb40ffd90944d5944f28e2c3:
main: Improve -v and -D option documentation (2017-03-27 11:11:05 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib paule/codeparser-log
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=paule/codeparser-log
Paul Eggleton (1):
lib/bb/codeparser: ensure BufferedLogger respects target logging level
lib/bb/codeparser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.9.3
PATCH v2 1/1 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.
--- lib/bb/codeparser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/bb/codeparser.py +2 -1
@@ -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():
Signature · 1 line
2.9.3