summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/msg.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-09 23:38:35 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:48 +0000
commitaaa55880ac79f470e613130baefdf317a764cbf2 (patch)
tree9ce5da72131cd6087afad976f51ab73457d201e4 /bitbake/lib/bb/msg.py
parent25e519a80fc453de1468823b2bf26ab053aa0dca (diff)
downloadpoky-aaa55880ac79f470e613130baefdf317a764cbf2.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb/msg.py')
-rw-r--r--bitbake/lib/bb/msg.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index b876219da6..36d7060b1c 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -30,6 +30,15 @@ import warnings
30import bb 30import bb
31import bb.event 31import bb.event
32 32
33class BBLogFormatter(logging.Formatter):
34 """Formatter which ensures that our 'plain' messages (logging.INFO + 1) are used as is"""
35
36 def format(self, record):
37 if record.levelno == logging.INFO + 1:
38 return record.getMessage()
39 else:
40 return logging.Formatter.format(self, record)
41
33class Loggers(dict): 42class Loggers(dict):
34 def __getitem__(self, key): 43 def __getitem__(self, key):
35 if key in self: 44 if key in self: