From 816fa80162a804552a0515eaa87d0d38dde0ba69 Mon Sep 17 00:00:00 2001 From: hanabi1224 Date: Tue, 3 Dec 2024 20:14:29 +0800 Subject: [PATCH] fix(log): demote some WARN logs to DEBUG to reduce noises (#5029) --- src/libp2p/hello/behaviour.rs | 2 +- src/libp2p_bitswap/request_manager.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libp2p/hello/behaviour.rs b/src/libp2p/hello/behaviour.rs index 32f6a3d3b796..6a6c9188711d 100644 --- a/src/libp2p/hello/behaviour.rs +++ b/src/libp2p/hello/behaviour.rs @@ -199,7 +199,7 @@ impl NetworkBehaviour for HelloBehaviour { { self.pending_inbound_hello_peers.remove(&peer_to_disconnect); if !self.peer_manager.is_peer_protected(&peer_to_disconnect) { - tracing::warn!(peer=%peer_to_disconnect, "Disconnecting peer for not receiving hello in 30s"); + tracing::debug!(peer=%peer_to_disconnect, "Disconnecting peer for not receiving hello in 30s"); return Poll::Ready(ToSwarm::CloseConnection { peer_id: peer_to_disconnect, connection: CloseConnection::All, diff --git a/src/libp2p_bitswap/request_manager.rs b/src/libp2p_bitswap/request_manager.rs index c612524d212c..2e5b83af0122 100644 --- a/src/libp2p_bitswap/request_manager.rs +++ b/src/libp2p_bitswap/request_manager.rs @@ -151,7 +151,7 @@ impl BitswapRequestManager { if let Some(responder) = responder { if let Err(e) = responder.send_async(success).await { - warn!("{e}"); + debug!("{e}"); } } @@ -198,7 +198,7 @@ impl BitswapRequestManager { for peer in selected_peers { if let Err(e) = self.outbound_have_request_tx.send((peer, cid)) { - warn!("{e}"); + debug!("{e}"); } } @@ -292,7 +292,7 @@ impl BitswapRequestManager { // node no longer wants those blocks. for &peer in self.peers.read().iter() { if let Err(e) = self.outbound_cancel_request_tx.send((peer, cid)) { - warn!("{e}"); + debug!("{e}"); } } } else {