summaryrefslogtreecommitdiff
path: root/distbuild
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-05-16 15:42:56 +0100
committerBaserock Gerrit <gerrit@baserock.org>2015-05-18 13:38:15 +0000
commit88967bfe9bc5bc1b8baba1b3d221630067c429b0 (patch)
tree737fb1006f10047fbe612e905be739094aa9639e /distbuild
parentc373f5a403b0ec84834d2f04fd1efac3792a7d35 (diff)
downloadmorph-88967bfe9bc5bc1b8baba1b3d221630067c429b0.tar.gz
Disable logging of build output by default
Logging build output makes the controller logs difficult to read. Change-Id: I5b81ff9359ada969e964328eb1c2624ab6b9375a
Diffstat (limited to 'distbuild')
-rw-r--r--distbuild/build_controller.py9
-rw-r--r--distbuild/initiator_connection.py9
2 files changed, 13 insertions, 5 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py
index 9b934da6..2bde781f 100644
--- a/distbuild/build_controller.py
+++ b/distbuild/build_controller.py
@@ -202,6 +202,7 @@ class BuildController(distbuild.StateMachine):
self._helper_id = None
self.debug_transitions = False
self.debug_graph_state = False
+ self._debug_build_output = False
self.allow_detach = build_request_message['allow_detach']
self.build_info = {
'id': build_request_message['id'],
@@ -632,7 +633,9 @@ class BuildController(distbuild.StateMachine):
if self._request['id'] not in event.msg['ids']:
return # not for us
- logging.debug('BC: got output: %s' % repr(event.msg))
+ if self._debug_build_output:
+ logging.debug('BC: got output: %s' % repr(event.msg))
+
artifact = self._find_artifact(event.artifact_cache_key)
logging.debug('BC: got artifact: %s' % repr(artifact))
if artifact is None:
@@ -643,7 +646,9 @@ class BuildController(distbuild.StateMachine):
self._request['id'], build_step_name(artifact),
event.msg['stdout'], event.msg['stderr'])
self.mainloop.queue_event(BuildController, output)
- logging.debug('BC: queued %s' % repr(output))
+
+ if self._debug_build_output:
+ logging.debug('BC: queued %s' % repr(output))
def _maybe_relay_build_caching(self, event_source, event):
distbuild.crash_point()
diff --git a/distbuild/initiator_connection.py b/distbuild/initiator_connection.py
index 4efcfdb1..b3e17e98 100644
--- a/distbuild/initiator_connection.py
+++ b/distbuild/initiator_connection.py
@@ -60,6 +60,7 @@ class InitiatorConnection(distbuild.StateMachine):
self.artifact_cache_server = artifact_cache_server
self.morph_instance = morph_instance
self.initiator_name = conn.remotename()
+ self._debug_build_output = False
def __repr__(self):
return '<InitiatorConnection at 0x%x: remote %s>' % (id(self),
@@ -339,9 +340,11 @@ class InitiatorConnection(distbuild.StateMachine):
self._log_send(msg)
def _send_build_output_message(self, event_source, event):
- logging.debug('InitiatorConnection: build_output: '
- 'id=%s stdout=%s stderr=%s' %
- (repr(event.id), repr(event.stdout), repr(event.stderr)))
+ if self._debug_build_output:
+ logging.debug('InitiatorConnection: build_output: '
+ 'id=%s stdout=%s stderr=%s' %
+ (repr(event.id), repr(event.stdout),
+ repr(event.stderr)))
if event.id in self.our_ids:
msg = distbuild.message('step-output',
id=self._route_map.get_incoming_id(event.id),