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-04-14 16:25:19 +0900
commit3cbc04979227314d838684967c4110d9dddef266 (patch)
tree1dc14392f800d4df17d2490fae2ffdb127003255
parent1e9f7e45d8c5ef4a8c5db131e69e701c8cb6eb82 (diff)
downloadbuildstream-3cbc04979227314d838684967c4110d9dddef266.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 5d6dfedc9..f48d9cbe1 100644
--- a/buildstream/_frontend/app.py
+++ b/buildstream/_frontend/app.py
@@ -203,11 +203,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,
@@ -220,6 +215,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
#