summaryrefslogtreecommitdiffstats
path: root/lib/bb/msg.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-09 23:38:35 -0500
committerChris Larson <chris_larson@mentor.com>2010-12-10 09:56:15 -0500
commitee1cce6ab21ddda60a7a070d03e98ff8485a5e71 (patch)
treeab54015a15eee137416cce360dafc67131fbbf9d /lib/bb/msg.py
parent411b808b81216473c3dbeca783ec5bc99152da26 (diff)
downloadbitbake-ee1cce6ab21ddda60a7a070d03e98ff8485a5e71.tar.gz
build: send logging messages to the log file for python functions
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/msg.py')
-rw-r--r--lib/bb/msg.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py
index 42e20a8ec..0c1fa3bfc 100644
--- a/lib/bb/msg.py
+++ b/lib/bb/msg.py
@@ -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: