mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-26 00:01:33 +00:00
fix(kad): reduce noise of "remote supports our protocol" log
This PR changes the logging of the Kademlia connection handler related to the remote Kademlia mode changes: - Downgrade log level for the remote kademlia protocol report from `info` to `debug`. - Introduce connection_id for the handler to improve logging. Pull-Request: #4278.
This commit is contained in:
@ -53,6 +53,7 @@ use libp2p_core::upgrade::{NegotiationError, ProtocolError};
|
||||
use libp2p_core::Endpoint;
|
||||
use libp2p_identity::PeerId;
|
||||
use std::collections::HashSet;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use std::future::Future;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::task::Waker;
|
||||
@ -82,6 +83,12 @@ impl ConnectionId {
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for ConnectionId {
|
||||
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
||||
write!(f, "{}", self.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// Information about a successfully established connection.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub(crate) struct Connected {
|
||||
|
Reference in New Issue
Block a user