mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Suppress some peers logs by trace level instead of debug (#1952)
* suppress some peers boring logs by trace instead of debug * rustfmt
This commit is contained in:
parent
183d9c9f3e
commit
2352275dff
3 changed files with 15 additions and 8 deletions
|
@ -395,7 +395,7 @@ impl Peer {
|
|||
}
|
||||
|
||||
pub fn send_peer_request(&self, capab: Capabilities) -> Result<(), Error> {
|
||||
debug!("Asking {} for more peers.", self.info.addr);
|
||||
trace!("Asking {} for more peers.", self.info.addr);
|
||||
self.connection.as_ref().unwrap().lock().send(
|
||||
&GetPeerAddrs {
|
||||
capabilities: capab,
|
||||
|
|
|
@ -151,9 +151,12 @@ impl Server {
|
|||
Ok(peer)
|
||||
}
|
||||
Err(e) => {
|
||||
debug!(
|
||||
trace!(
|
||||
"connect_peer: on {}:{}. Could not connect to {}: {:?}",
|
||||
self.config.host, self.config.port, addr, e
|
||||
self.config.host,
|
||||
self.config.port,
|
||||
addr,
|
||||
e
|
||||
);
|
||||
Err(Error::Connection(e))
|
||||
}
|
||||
|
|
|
@ -172,9 +172,11 @@ fn monitor_peers(
|
|||
// ask them for their list of peers
|
||||
let mut connected_peers: Vec<SocketAddr> = vec![];
|
||||
for p in peers.connected_peers() {
|
||||
debug!(
|
||||
trace!(
|
||||
"monitor_peers: {}:{} ask {} for more peers",
|
||||
config.host, config.port, p.info.addr,
|
||||
config.host,
|
||||
config.port,
|
||||
p.info.addr,
|
||||
);
|
||||
let _ = p.send_peer_request(capabilities);
|
||||
connected_peers.push(p.info.addr)
|
||||
|
@ -211,9 +213,11 @@ fn monitor_peers(
|
|||
config.peer_max_count() as usize,
|
||||
);
|
||||
for p in new_peers.iter().filter(|p| !peers.is_known(&p.addr)) {
|
||||
debug!(
|
||||
trace!(
|
||||
"monitor_peers: on {}:{}, queue to soon try {}",
|
||||
config.host, config.port, p.addr,
|
||||
config.host,
|
||||
config.port,
|
||||
p.addr,
|
||||
);
|
||||
tx.send(p.addr).unwrap();
|
||||
}
|
||||
|
@ -257,7 +261,7 @@ fn connect_to_seeds_and_preferred_peers(
|
|||
// If we have preferred peers add them to the connection
|
||||
match peers_preferred_list {
|
||||
Some(mut peers_preferred) => peer_addrs.append(&mut peers_preferred),
|
||||
None => debug!("No preferred peers"),
|
||||
None => trace!("No preferred peers"),
|
||||
};
|
||||
|
||||
if peer_addrs.len() == 0 {
|
||||
|
|
Loading…
Reference in a new issue