From e914dd11aa097f090f9f161cc0a41dfda1da8b43 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Thu, 13 Jun 2024 11:55:07 +0200 Subject: [PATCH] remote: reduce debug output Signed-off-by: Jan Luebbe --- labgrid/remote/common.py | 3 +-- labgrid/remote/coordinator.py | 1 - labgrid/remote/exporter.py | 7 ++----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/labgrid/remote/common.py b/labgrid/remote/common.py index b42292065..784d74645 100644 --- a/labgrid/remote/common.py +++ b/labgrid/remote/common.py @@ -469,12 +469,11 @@ async def queue_as_aiter(q): try: while True: item = await q.get() - logging.info(f"queue_as_aiter item {item}") if item is None: return yield item q.task_done() - print(f"sent {item}") + logging.debug(f"sent message {item}") except Exception: logging.exception("error in queue_as_aiter") raise diff --git a/labgrid/remote/coordinator.py b/labgrid/remote/coordinator.py index bd4add12e..b0f958fec 100644 --- a/labgrid/remote/coordinator.py +++ b/labgrid/remote/coordinator.py @@ -662,7 +662,6 @@ async def request_task(): await self._update_acquired_places(action, resource, callback=False) logging.debug(f"exporter aborted {context.peer()}, cancelled: {context.cancelled()}") - logging.debug("Exporters: %s", self.exporters) async def AcquirePlace(self, request, context): peer = context.peer() diff --git a/labgrid/remote/exporter.py b/labgrid/remote/exporter.py index f4ed0cd37..3b92e73c0 100755 --- a/labgrid/remote/exporter.py +++ b/labgrid/remote/exporter.py @@ -801,7 +801,7 @@ async def message_pump(self): try: async for out_message in self.stub.ExporterStream(queue_as_aiter(self.out_queue)): got_message = True - logging.debug(f"out_message {out_message}") + logging.debug(f"received message {out_message}") kind = out_message.WhichOneof("kind") if kind == "hello": logging.info("connected to exporter version %s", out_message.hello.version) @@ -929,15 +929,12 @@ async def add_resource(self, group_name, resource_name, cls, params): async def update_resource(self, group_name, resource_name): """Update status on the coordinator""" resource = self.groups[group_name][resource_name] - print(resource) - data = resource.asdict() - print(data) msg = labgrid_coordinator_pb2.ExporterInMessage() msg.resource.CopyFrom(resource.as_pb2()) msg.resource.path.group_name = group_name msg.resource.path.resource_name = resource_name - print(f"encoded {msg}") self.out_queue.put_nowait(msg) + logging.info("queued update for resource %s/%s", group_name, resource_name) async def amain(config) -> bool: