summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/ui
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/ui
parent25e519a80fc453de1468823b2bf26ab053aa0dca (diff)
downloadopenembedded-core-aaa55880ac79f470e613130baefdf317a764cbf2.tar.gz
openembedded-core-aaa55880ac79f470e613130baefdf317a764cbf2.tar.bz2
openembedded-core-aaa55880ac79f470e613130baefdf317a764cbf2.tar.xz
openembedded-core-aaa55880ac79f470e613130baefdf317a764cbf2.zip
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/ui')
-rw-r--r--bitbake/lib/bb/ui/knotty.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 9385883ea..e0f08ecb6 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -26,6 +26,7 @@ import itertools
import xmlrpclib
import logging
import progressbar
+import bb.msg
from bb import ui
from bb.ui import uihelper
@@ -57,15 +58,6 @@ class NonInteractiveProgress(object):
self.fobj.write("done.\n")
self.fobj.flush()
-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)
-
def main(server, eventHandler):
# Get values of variables which control our output
@@ -85,7 +77,7 @@ def main(server, eventHandler):
logging.addLevelName(level, logging.getLevelName(logging.DEBUG))
console = logging.StreamHandler(sys.stdout)
- format = BBLogFormatter("%(levelname)s: %(message)s")
+ format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
console.setFormatter(format)
logger.addHandler(console)