Skip to content

refactor(netwatch): Do not use info logging #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading