Skip to content

Commit

Permalink
Improve logging
Browse files Browse the repository at this point in the history
  • Loading branch information
agners committed Sep 4, 2024
1 parent 3b239a6 commit 66faa0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ async def _setup_node_with_retry(self, node_id: int) -> None:
):
# NOTE: assume the node will be picked up by mdns discovery later
# automatically when it becomes available again.
logging.warning(
node_logger.warning(
"Node setup not completed after %s minutes, giving up.",
NODE_MDNS_SUBSCRIPTION_RETRY_TIMEOUT // 60,
)
Expand All @@ -1416,7 +1416,8 @@ async def _setup_node_with_retry(self, node_id: int) -> None:
def _setup_node_create_task(self, node_id: int) -> asyncio.Task | None:
"""Create a task for setting up a node with retry."""
if node_id in self._setup_node_with_retry_tasks:
logging.debug("Node setup task already exists for node %s", node_id)
node_logger = self.get_node_logger(LOGGER, node_id)
node_logger.debug("Setup task exists already for this Node")
return None
task = asyncio.create_task(self._setup_node_with_retry(node_id))
self._setup_node_with_retry_tasks[node_id] = task
Expand Down

0 comments on commit 66faa0b

Please sign in to comment.