diff options
author | cyqsimon <28627918+cyqsimon@users.noreply.github.com> | 2024-03-25 13:20:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 13:20:12 +0800 |
commit | 32506e7f245171b43b22df1bda7fbcfcc7717f3e (patch) | |
tree | d1f4704b9653b8bbecd52cdc442a8cabf896f049 /src/os/shared.rs | |
parent | 1997bce393313d7ba685ee127d743e3a310530ac (diff) |
Remove unnecessary logging synchronisation (#381)
* Revert 89e1140
- simplelog is already thread safe
- see https://github.com/Drakulix/simplelog.rs/issues/146
* Write changelog
* Fix import for MacOS
Diffstat (limited to 'src/os/shared.rs')
-rw-r--r-- | src/os/shared.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os/shared.rs b/src/os/shared.rs index d8dd477..fbe3559 100644 --- a/src/os/shared.rs +++ b/src/os/shared.rs @@ -7,10 +7,11 @@ use std::{ use anyhow::{anyhow, bail}; use crossterm::event::{read, Event}; use itertools::Itertools; +use log::{debug, warn}; use pnet::datalink::{self, Channel::Ethernet, Config, DataLinkReceiver, NetworkInterface}; use tokio::runtime::Runtime; -use crate::{mt_log, network::dns, os::errors::GetInterfaceError, OsInputOutput}; +use crate::{network::dns, os::errors::GetInterfaceError, OsInputOutput}; #[cfg(target_os = "linux")] use crate::os::linux::get_open_sockets; @@ -112,7 +113,7 @@ pub fn get_input( interface.is_up() && !interface.ips.is_empty() }; if !keep { - mt_log!(debug, "{} is down. Skipping it.", interface.name); + debug!("{} is down. Skipping it.", interface.name); } keep }) @@ -137,8 +138,7 @@ pub fn get_input( .iter() .filter_map(|(interface, frames_res)| frames_res.as_ref().err().map(|err| (interface, err))) .for_each(|(interface, err)| { - mt_log!( - warn, + warn!( "Failed to acquire a frame receiver for {}: {err}", interface.name ) |