mirror of
https://git.yoctoproject.org/poky
synced 2026-04-28 06:32:34 +02:00
build: send logging messages to the log file for python functions
(Bitbake rev: ee1cce6ab21ddda60a7a070d03e98ff8485a5e71) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
committed by
Richard Purdie
parent
25e519a80f
commit
aaa55880ac
@@ -30,6 +30,15 @@ import warnings
|
||||
import bb
|
||||
import bb.event
|
||||
|
||||
class BBLogFormatter(logging.Formatter):
|
||||
"""Formatter which ensures that our 'plain' messages (logging.INFO + 1) are used as is"""
|
||||
|
||||
def format(self, record):
|
||||
if record.levelno == logging.INFO + 1:
|
||||
return record.getMessage()
|
||||
else:
|
||||
return logging.Formatter.format(self, record)
|
||||
|
||||
class Loggers(dict):
|
||||
def __getitem__(self, key):
|
||||
if key in self:
|
||||
|
||||
Reference in New Issue
Block a user