From e44db25807d550da6ffeed52d894a2243a072202 Mon Sep 17 00:00:00 2001 From: Bo QIU <35757521+boqiu@users.noreply.github.com> Date: Thu, 4 Jul 2024 16:30:05 +0800 Subject: [PATCH] opt log level for file announcement relevant logs (#109) --- node/router/src/service.rs | 4 ++-- node/sync/src/auto_sync/batcher_serial.rs | 2 +- node/sync/src/service.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/node/router/src/service.rs b/node/router/src/service.rs index f1590a2..36cbbb5 100644 --- a/node/router/src/service.rs +++ b/node/router/src/service.rs @@ -125,7 +125,7 @@ impl RouterService { ev: Libp2pEvent, shutdown_sender: &mut Sender, ) { - debug!(?ev, "Received new event from libp2p"); + trace!(?ev, "Received new event from libp2p"); match ev { Libp2pEvent::Behaviour(event) => match event { @@ -221,7 +221,7 @@ impl RouterService { msg: NetworkMessage, _shutdown_sender: &mut Sender, ) { - debug!(?msg, "Received new message"); + trace!(?msg, "Received new message"); match msg { NetworkMessage::SendRequest { diff --git a/node/sync/src/auto_sync/batcher_serial.rs b/node/sync/src/auto_sync/batcher_serial.rs index a76fb69..86b491f 100644 --- a/node/sync/src/auto_sync/batcher_serial.rs +++ b/node/sync/src/auto_sync/batcher_serial.rs @@ -117,7 +117,7 @@ impl SerialBatcher { Err(_) => return false, }; - debug!(%announced_tx_seq, "Received file announcement"); + trace!(%announced_tx_seq, "Received file announcement"); // new file announced if self.max_tx_seq == u64::MAX || announced_tx_seq > self.max_tx_seq { diff --git a/node/sync/src/service.rs b/node/sync/src/service.rs index 3c37d33..cb77f63 100644 --- a/node/sync/src/service.rs +++ b/node/sync/src/service.rs @@ -214,7 +214,7 @@ impl SyncService { } async fn on_sync_msg(&mut self, msg: SyncMessage) { - debug!("Sync received message {:?}", msg); + trace!("Sync received message {:?}", msg); match msg { SyncMessage::DailFailed { peer_id, err } => { @@ -619,7 +619,7 @@ impl SyncService { async fn on_announce_file_gossip(&mut self, tx_id: TxID, peer_id: PeerId, addr: Multiaddr) { let tx_seq = tx_id.seq; - debug!(%tx_seq, %peer_id, %addr, "Received AnnounceFile gossip"); + trace!(%tx_seq, %peer_id, %addr, "Received AnnounceFile gossip"); if let Some(send) = &self.file_announcement_send { let _ = send.send(tx_seq);