bitbake: lib/bb: warning when the debug message is invalid

There are many messed up calls for the debug log,
so is better to warm about this as they will not work
as expected.

The level need to be an integer and the msg a string.

(Bitbake rev: c1d9c1d25ce36848040dc0ce182835e497ccbb82)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Jose Quaresma
2022-09-19 09:13:11 +00:00
committed by Richard Purdie
parent 3e0e5347e6
commit e2c3bd1638

View File

@@ -60,6 +60,10 @@ class BBLoggerMixin(object):
return
if loglevel < bb.msg.loggerDefaultLogLevel:
return
if not isinstance(level, int) or not isinstance(msg, str):
mainlogger.warning("Invalid arguments in bbdebug: %s" % repr((level, msg,) + args))
return self.log(loglevel, msg, *args, **kwargs)
def plain(self, msg, *args, **kwargs):