Skip to content

Commit f6b6375

Browse files
authored
refactor(netwatch): Do not use info logging (#8)
This is much to verbose. See also n0-computer/iroh#3071
1 parent 68f203d commit f6b6375

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

netwatch/src/netmon/actor.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use anyhow::Result;
88
use futures_lite::future::Boxed as BoxFuture;
99
use os::{is_interesting_interface, RouteMonitor};
1010
use tokio::sync::{mpsc, oneshot};
11-
use tracing::{debug, info, trace, warn};
11+
use tracing::{debug, trace, warn};
1212

1313
#[cfg(target_os = "android")]
1414
use super::android as os;
@@ -173,7 +173,7 @@ impl Actor {
173173
}
174174

175175
async fn handle_potential_change(&mut self, time_jumped: bool) -> Result<()> {
176-
info!("potential change");
176+
trace!("potential change");
177177

178178
let new_state = State::new().await;
179179
let old_state = &self.interface_state;

netwatch/src/netmon/linux.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use netlink_packet_route::{address, route, RouteNetlinkMessage};
1414
use netlink_sys::{AsyncSocket, SocketAddr};
1515
use rtnetlink::new_connection;
1616
use tokio::{sync::mpsc, task::JoinHandle};
17-
use tracing::{info, trace, warn};
17+
use tracing::{trace, warn};
1818

1919
use super::actor::NetworkMessage;
2020
use crate::ip::is_link_local;
@@ -78,7 +78,7 @@ impl RouteMonitor {
7878
warn!("error reading netlink payload: {:?}", err);
7979
}
8080
NetlinkPayload::Done(_) => {
81-
info!("done received, exiting");
81+
trace!("done received, exiting");
8282
break;
8383
}
8484
NetlinkPayload::InnerMessage(msg) => match msg {

netwatch/src/udp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl UdpSocket {
170170
/// limiting packets that are read via `recv` from the address specified in
171171
/// `addr`.
172172
pub fn connect(&self, addr: SocketAddr) -> io::Result<()> {
173-
tracing::info!("connecting to {}", addr);
173+
trace!(%addr, "connecting");
174174
let guard = self.socket.read().unwrap();
175175
let (socket_tokio, _state) = guard.try_get_connected()?;
176176

0 commit comments

Comments
 (0)