From 939230038cee3b7274f8aca0855785feaaa754b6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 10 Apr 2024 11:36:00 +0100 Subject: [PATCH] fix: reduce logging level Some info changed to debug. Tests left at info. --- Cargo.toml | 2 +- src/filesystem.rs | 6 +++--- src/network/real.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ffc1a80..6b3a1d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kxio" -version = "0.1.1" +version = "0.1.2" edition = "2021" authors = ["Paul Campbell "] description = "Provides injectable Filesystem and Network resources to make code more testable" diff --git a/src/filesystem.rs b/src/filesystem.rs index 2170b45..96dc633 100644 --- a/src/filesystem.rs +++ b/src/filesystem.rs @@ -7,7 +7,7 @@ use std::{ }; use tempfile::{tempdir, TempDir}; -use tracing::info; +use tracing::{debug, info}; #[derive(Clone, Debug)] pub enum FileSystem { @@ -46,7 +46,7 @@ pub trait FileSystemEnv: Sync + Send + std::fmt::Debug { use std::io::{LineWriter, Write}; let path = self.in_cwd(file_name); - info!("writing to {:?}", path); + debug!("writing to {:?}", path); let file = File::create(path.clone())?; let mut file = LineWriter::new(file); file.write_all(content.as_bytes())?; @@ -63,7 +63,7 @@ pub trait FileSystemEnv: Sync + Send + std::fmt::Debug { use std::io::Read; let path = self.in_cwd(file_name); - info!("reading from {:?}", path); + debug!("reading from {:?}", path); let mut file = File::open(path)?; let mut content = String::new(); file.read_to_string(&mut content)?; diff --git a/src/network/real.rs b/src/network/real.rs index e84d5da..6a28b1c 100644 --- a/src/network/real.rs +++ b/src/network/real.rs @@ -169,7 +169,7 @@ impl NetworkTrait for RealNetwork { &self, net_request: NetRequest, ) -> Result, NetworkError> { - tracing::info!("RealNetworkEnv::get({:?})", net_request); + tracing::debug!("RealNetworkEnv::get({:?})", net_request); let url = net_request.url(); let auth = net_request.auth(); let response_type = net_request.response_type();