]> code.ossystems Code Review - openembedded-core.git/commitdiff
event: use BBLogFormatter in print_ui_queue
authorChris Larson <chris_larson@mentor.com>
Wed, 5 Jan 2011 18:20:05 +0000 (11:20 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Jan 2011 10:47:08 +0000 (10:47 +0000)
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>
bitbake/lib/bb/event.py

index 3866e01f2b83f0a9574b959e7481dbb133fd0fb7..8b45501c000d7c5abfddc7f9c4ce2f1de6529859 100644 (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()