From 8578fb0c3ec87d51d4d3ee406a7d36a261d6744c Mon Sep 17 00:00:00 2001 From: gabrielmer <101006718+gabrielmer@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:55:31 +0300 Subject: [PATCH] chore: improving logging under debugDiscv5 flag (#2899) --- waku/node/peer_manager/peer_manager.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/waku/node/peer_manager/peer_manager.nim b/waku/node/peer_manager/peer_manager.nim index 774259de93..f4ef5e1bb3 100644 --- a/waku/node/peer_manager/peer_manager.nim +++ b/waku/node/peer_manager/peer_manager.nim @@ -665,8 +665,11 @@ proc connectToNodes*( when defined(debugDiscv5): let peerIds = connectedPeers.mapIt(it.peerId) let origin = connectedPeers.mapIt(it.origin) - notice "established connections with found peers", - peerIds = peerIds, origin = origin + if peerIds.len > 0: + notice "established connections with found peers", + peerIds = peerIds.mapIt(shortLog(it)), origin = origin + else: + notice "could not connect to new peers", attempted = nodes.len info "Finished dialing multiple peers", successfulConns = connectedPeers.len, attempted = nodes.len