summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-22 11:04:40 -0500
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2019-01-24 13:02:08 -0500
commit41f03296791db6fc3cded6310dbaebe855765084 (patch)
tree116801d43035016c9ea4542a3129562484a9ee63
parentacd0bf224cb447b3c650da22d4e3b55964a87521 (diff)
downloadbuildstream-41f03296791db6fc3cded6310dbaebe855765084.tar.gz
_frontend/app.py: Initialize logging before preflighting the artifact cache
The artifact cache emits messages, and we want to allow that in preflight.
-rw-r--r--buildstream/_frontend/app.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py
index af38ae901..b6da079bd 100644
--- a/buildstream/_frontend/app.py
+++ b/buildstream/_frontend/app.py
@@ -194,11 +194,6 @@ class App():
except BstError as e:
self._error_exit(e, "Error instantiating platform")
- try:
- self.context.artifactcache.preflight()
- except BstError as e:
- self._error_exit(e, "Error instantiating artifact cache")
-
# Create the logger right before setting the message handler
self.logger = LogLine(self.context,
self._content_profile,
@@ -211,6 +206,13 @@ class App():
# Propagate pipeline feedback to the user
self.context.set_message_handler(self._message_handler)
+ # Preflight the artifact cache after initializing logging,
+ # this can cause messages to be emitted.
+ try:
+ self.context.artifactcache.preflight()
+ except BstError as e:
+ self._error_exit(e, "Error instantiating artifact cache")
+
#
# Load the Project
#