event: use BBLogFormatter in print_ui_queue

This ensures that when a failure occurs very early on in bitbake startup, the
message formatting ematches that used by the UIs.

(Bitbake rev: c8ff0fd3e9f050a668f1a069cf37ee37db3664fa)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Larson
2011-01-05 11:20:05 -07:00
committed by Richard Purdie
parent e7febaa343
commit 74653168c0

View File

@@ -84,8 +84,9 @@ def print_ui_queue():
LogRecords to the console."""
logger = logging.getLogger("BitBake")
if not _ui_handlers:
from bb.msg import BBLogFormatter
console = logging.StreamHandler(sys.stdout)
console.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
console.setFormatter(BBLogFormatter("%(levelname)s: %(message)s"))
logger.handlers = [console]
while ui_queue:
event = ui_queue.pop()