diff --git a/src/lib.rs b/src/lib.rs index 43d5ed5..b6d6f8f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,7 +9,7 @@ use isahc::{ http::{Method, StatusCode, header}, }; use secrecy::SecretString; -use tracing::{Level, debug, error}; +use tracing::{Level, debug, error, info}; use tracing_subscriber::fmt::format::FmtSpan; pub fn setup_logger(debug: bool) { @@ -105,8 +105,9 @@ impl Client { }) } - #[tracing::instrument(level = "info", skip(cache))] + #[tracing::instrument(level = "debug", skip(cache))] pub fn save_cache(&self, key: &CacheKey, cache: Vec) -> Result<()> { + info!(?key, "save cache"); let cache_len = cache.len(); let cache_id = self.reserve(key, cache_len).context("reserving cache")?; @@ -234,8 +235,9 @@ impl Client { Ok(()) } - #[tracing::instrument(level = "info")] + #[tracing::instrument(level = "debug")] pub fn load_cache(&self, key: &CacheKey) -> Result>> { + info!(?key, "load cache"); let Some(cache_location) = self.get_cache_entry(key).context("getting cache entry")? else { // cache miss return Ok(None);