diff options
Diffstat (limited to 'src/os/lsof_utils.rs')
-rw-r--r-- | src/os/lsof_utils.rs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/os/lsof_utils.rs b/src/os/lsof_utils.rs index 6fd61f8..4a61c67 100644 --- a/src/os/lsof_utils.rs +++ b/src/os/lsof_utils.rs @@ -1,10 +1,10 @@ use std::{ffi::OsStr, net::IpAddr, process::Command}; +use log::warn; use once_cell::sync::Lazy; use regex::Regex; use crate::{ - mt_log, network::{LocalSocket, Protocol}, os::ProcessInfo, }; @@ -123,24 +123,15 @@ impl RawConnection { let process = &self.proc_info.name; let Some(ip) = self.get_local_ip() else { - mt_log!( - warn, - r#"Failed to get the local IP of a connection belonging to "{process}"."# - ); + warn!(r#"Failed to get the local IP of a connection belonging to "{process}"."#); return None; }; let Some(port) = self.get_local_port() else { - mt_log!( - warn, - r#"Failed to get the local port of a connection belonging to "{process}"."# - ); + warn!(r#"Failed to get the local port of a connection belonging to "{process}"."#); return None; }; let Some(protocol) = self.get_protocol() else { - mt_log!( - warn, - r#"Failed to get the protocol of a connection belonging to "{process}"."# - ); + warn!(r#"Failed to get the protocol of a connection belonging to "{process}"."#); return None; }; |