fix: reduce logging level
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ci/woodpecker/cron/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful

Some info changed to debug. Tests left at info.
This commit is contained in:
Paul Campbell 2024-04-10 11:36:00 +01:00
parent fac1b38828
commit 939230038c
3 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "kxio" name = "kxio"
version = "0.1.1" version = "0.1.2"
edition = "2021" edition = "2021"
authors = ["Paul Campbell <pcampbell@kemitix.net>"] authors = ["Paul Campbell <pcampbell@kemitix.net>"]
description = "Provides injectable Filesystem and Network resources to make code more testable" description = "Provides injectable Filesystem and Network resources to make code more testable"

View file

@ -7,7 +7,7 @@ use std::{
}; };
use tempfile::{tempdir, TempDir}; use tempfile::{tempdir, TempDir};
use tracing::info; use tracing::{debug, info};
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum FileSystem { pub enum FileSystem {
@ -46,7 +46,7 @@ pub trait FileSystemEnv: Sync + Send + std::fmt::Debug {
use std::io::{LineWriter, Write}; use std::io::{LineWriter, Write};
let path = self.in_cwd(file_name); let path = self.in_cwd(file_name);
info!("writing to {:?}", path); debug!("writing to {:?}", path);
let file = File::create(path.clone())?; let file = File::create(path.clone())?;
let mut file = LineWriter::new(file); let mut file = LineWriter::new(file);
file.write_all(content.as_bytes())?; file.write_all(content.as_bytes())?;
@ -63,7 +63,7 @@ pub trait FileSystemEnv: Sync + Send + std::fmt::Debug {
use std::io::Read; use std::io::Read;
let path = self.in_cwd(file_name); let path = self.in_cwd(file_name);
info!("reading from {:?}", path); debug!("reading from {:?}", path);
let mut file = File::open(path)?; let mut file = File::open(path)?;
let mut content = String::new(); let mut content = String::new();
file.read_to_string(&mut content)?; file.read_to_string(&mut content)?;

View file

@ -169,7 +169,7 @@ impl NetworkTrait for RealNetwork {
&self, &self,
net_request: NetRequest, net_request: NetRequest,
) -> Result<NetResponse<T>, NetworkError> { ) -> Result<NetResponse<T>, NetworkError> {
tracing::info!("RealNetworkEnv::get({:?})", net_request); tracing::debug!("RealNetworkEnv::get({:?})", net_request);
let url = net_request.url(); let url = net_request.url();
let auth = net_request.auth(); let auth = net_request.auth();
let response_type = net_request.response_type(); let response_type = net_request.response_type();