Skip to content

Commit

Permalink
fix(network): Use DEBUG log level for network messages to reduce spam (
Browse files Browse the repository at this point in the history
  • Loading branch information
jancionear authored Sep 10, 2024
1 parent ea8ec28 commit 4b11f9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chain/network/src/peer/peer_actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ impl PeerActor {
} else {
#[cfg(test)]
self.network_state.config.event_sink.send(Event::RoutedMessageDropped);
tracing::warn!(target: "network", ?msg, from = ?conn.peer_info.id, "Message dropped because TTL reached 0.");
tracing::debug!(target: "network", ?msg, from = ?conn.peer_info.id, "Message dropped because TTL reached 0.");
metrics::ROUTED_MESSAGE_DROPPED
.with_label_values(&[msg.body_variant()])
.inc();
Expand Down Expand Up @@ -1529,7 +1529,7 @@ impl actix::Actor for PeerActor {
tracing::error!(target:"network", "closing reason not set. This should happen only in tests.");
}
Some(reason) => {
tracing::info!(target: "network", "{:?}: Peer {} disconnected, reason: {reason}", self.my_node_info.id, self.peer_info);
tracing::debug!(target: "network", "{:?}: Peer {} disconnected, reason: {reason}", self.my_node_info.id, self.peer_info);

// If we are on the inbound side of the connection, set a flag in the disconnect
// message advising the outbound side whether to attempt to re-establish the connection.
Expand Down
4 changes: 2 additions & 2 deletions chain/network/src/peer_manager/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl Connection {
})
.await;
if res.is_err() {
tracing::info!(
tracing::debug!(
"peer {} disconnected, while sending SyncAccountsData",
this.peer_info.id
);
Expand Down Expand Up @@ -232,7 +232,7 @@ impl Connection {
})
.await;
if res.is_err() {
tracing::info!(
tracing::debug!(
"peer {} disconnected, while sending SyncSnapshotHosts",
this.peer_info.id
);
Expand Down
4 changes: 2 additions & 2 deletions chain/network/src/peer_manager/network_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl NetworkState {
peer.stop(Some(ban_reason));
} else {
if let Err(err) = self.peer_store.peer_ban(clock, peer_id, ban_reason) {
tracing::error!(target: "network", ?err, "Failed to save peer data");
tracing::debug!(target: "network", ?err, "Failed to save peer data");
}
}
}
Expand Down Expand Up @@ -401,7 +401,7 @@ impl NetworkState {
_ => this.peer_store.peer_disconnected(&clock, &conn.peer_info.id),
};
if let Err(err) = res {
tracing::error!(target: "network", ?err, "Failed to save peer data");
tracing::debug!(target: "network", ?err, "Failed to save peer data");
}

// Save the fact that we are disconnecting to the ConnectionStore,
Expand Down

0 comments on commit 4b11f9f

Please sign in to comment.