Skip to content

Commit

Permalink
refactor(netwatch): Do not use info logging (#8)
Browse files Browse the repository at this point in the history
This is much to verbose. See also n0-computer/iroh#3071
  • Loading branch information
flub authored Jan 9, 2025
1 parent 68f203d commit f6b6375
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions netwatch/src/netmon/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use anyhow::Result;
use futures_lite::future::Boxed as BoxFuture;
use os::{is_interesting_interface, RouteMonitor};
use tokio::sync::{mpsc, oneshot};
use tracing::{debug, info, trace, warn};
use tracing::{debug, trace, warn};

#[cfg(target_os = "android")]
use super::android as os;
Expand Down Expand Up @@ -173,7 +173,7 @@ impl Actor {
}

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

let new_state = State::new().await;
let old_state = &self.interface_state;
Expand Down
4 changes: 2 additions & 2 deletions netwatch/src/netmon/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use netlink_packet_route::{address, route, RouteNetlinkMessage};
use netlink_sys::{AsyncSocket, SocketAddr};
use rtnetlink::new_connection;
use tokio::{sync::mpsc, task::JoinHandle};
use tracing::{info, trace, warn};
use tracing::{trace, warn};

use super::actor::NetworkMessage;
use crate::ip::is_link_local;
Expand Down Expand Up @@ -78,7 +78,7 @@ impl RouteMonitor {
warn!("error reading netlink payload: {:?}", err);
}
NetlinkPayload::Done(_) => {
info!("done received, exiting");
trace!("done received, exiting");
break;
}
NetlinkPayload::InnerMessage(msg) => match msg {
Expand Down
2 changes: 1 addition & 1 deletion netwatch/src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ impl UdpSocket {
/// limiting packets that are read via `recv` from the address specified in
/// `addr`.
pub fn connect(&self, addr: SocketAddr) -> io::Result<()> {
tracing::info!("connecting to {}", addr);
trace!(%addr, "connecting");
let guard = self.socket.read().unwrap();
let (socket_tokio, _state) = guard.try_get_connected()?;

Expand Down

0 comments on commit f6b6375

Please sign in to comment.