From 88967bfe9bc5bc1b8baba1b3d221630067c429b0 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Sat, 16 May 2015 15:42:56 +0100 Subject: Disable logging of build output by default Logging build output makes the controller logs difficult to read. Change-Id: I5b81ff9359ada969e964328eb1c2624ab6b9375a --- distbuild/build_controller.py | 9 +++++++-- distbuild/initiator_connection.py | 9 ++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'distbuild') 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 '' % (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), -- cgit v1.2.1