summaryrefslogtreecommitdiffstats
path: root/bin/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-12-17 10:13:18 -0600
committerChris Larson <chris_larson@mentor.com>2010-12-17 09:33:22 -0700
commitdb56f34e22e9a7c425f59d8f946c60e0a63f5f75 (patch)
tree1d3dfec2e0a41b75a2551a7bada2d332e8bcde8d /bin/bitbake
parent7c7648e62d9f162cdc2a93a350bfba6366b8d158 (diff)
downloadbitbake-db56f34e22e9a7c425f59d8f946c60e0a63f5f75.tar.gz
Ensure LogHandler is set up for the server construction
If we add the LogHandler object in the server.main, rather than earlier, any log messages emitted during the construction of the server (and, therefore, during the construction of the cooker) will not be seen. This includes the error(s) which the cooker can emit when parsing the command line. With this, we again see the error if you try to use -g without specifying a recipe to operate against. Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-xbin/bitbake6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/bitbake b/bin/bitbake
index fa7caf218..10cce2d13 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -174,6 +174,10 @@ Default BBFILES are the .bb files in the current directory.""")
bb.utils.init_logger(bb.msg, configuration.verbose, configuration.debug,
configuration.debug_domains)
+ # Ensure logging messages get sent to the UI as events
+ handler = bb.event.LogHandler()
+ logger.addHandler(handler)
+
# Clear away any spurious environment variables. But don't wipe the
# environment totally. This is necessary to ensure the correct operation
# of the UIs (e.g. for DISPLAY, etc.)
@@ -189,6 +193,8 @@ Default BBFILES are the .bb files in the current directory.""")
server = ProcessServer(server_channel, event_queue, configuration)
server.start()
+ logger.removeHandler(handler)
+
def shutdown(force=False):
signal.signal(signal.SIGINT, signal.SIG_IGN)
server.stop()