diff options
Diffstat (limited to 'bitbake/lib/bb/event.py')
-rw-r--r-- | bitbake/lib/bb/event.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index c04ffd5ac..3fb9ff5bf 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py @@ -328,20 +328,8 @@ class MsgPlain(MsgBase): class LogHandler(logging.Handler): """Dispatch logging messages as bitbake events""" - messages = ( - (logging.DEBUG, MsgDebug), - (logging.INFO, MsgNote), - (logging.WARNING, MsgWarn), - (logging.ERROR, MsgError), - (logging.CRITICAL, MsgFatal), - ) - def emit(self, record): - for level, msgclass in self.messages: - if record.levelno <= level: - msg = self.format(record) - fire(msgclass(msg), None) - if bb.event.useStdout: - print(record.levelname + ": " + record.getMessage()) - break + fire(record, None) + if bb.event.useStdout: + print(self.format(record)) |