From 74653168c08f4a3cee86e37e8f805ca3d4365e1a Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 5 Jan 2011 11:20:05 -0700 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/event.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py index 3866e01f2b..8b45501c00 100644 --- a/bitbake/lib/bb/event.py +++ b/bitbake/lib/bb/event.py @@ -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() -- cgit v1.2.3