From 34aa8f4da6b22c7ff6e8e715c30187735005f5ff Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Wed, 22 Jan 2025 11:28:09 -0700 Subject: [PATCH] Quiet plist reading logs --- src/devices.rs | 6 +++--- src/main.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/devices.rs b/src/devices.rs index aaa7614..b75510a 100644 --- a/src/devices.rs +++ b/src/devices.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, io::Read, net::IpAddr, path::PathBuf, sync::Arc}; -use log::{info, trace, warn}; +use log::{debug, info, trace, warn}; use tokio::sync::{mpsc::UnboundedSender, Mutex}; use crate::heartbeat; @@ -187,13 +187,13 @@ impl SharedDevices { plist::to_writer_xml(f, &new_plist).unwrap(); } // Read the file to a string - info!("Reading SystemConfiguration.plist"); + debug!("Reading SystemConfiguration.plist"); let mut file = std::fs::File::open(path).unwrap(); let mut contents = Vec::new(); file.read_to_end(&mut contents).unwrap(); // Parse the string into a plist - info!("Parsing SystemConfiguration.plist"); + debug!("Parsing SystemConfiguration.plist"); let plist = plist::from_bytes::(&contents).unwrap(); match plist.get("SystemBUID") { Some(plist::Value::String(b)) => Ok(b.to_owned()), diff --git a/src/main.rs b/src/main.rs index 6b296f0..0a533f6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use std::{fs, os::unix::prelude::PermissionsExt}; use crate::raw_packet::RawPacket; use devices::SharedDevices; -use log::{error, info, trace, warn}; +use log::{debug, error, info, trace, warn}; use tokio::{ io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt}, sync::Mutex, @@ -215,7 +215,7 @@ async fn handle_stream( }; trace!("Recv'd {size} bytes"); if size == 0 { - info!("Received size is zero, closing connection"); + debug!("Received size is zero, closing connection"); return; }