v2 #2

Merged
dzu merged 12 commits from dev into main 2026-02-21 10:51:46 +01:00
Showing only changes of commit 2904b795a2 - Show all commits

fix: remove client logging

Artem Diachenko 2026-02-21 09:37:52 +00:00

View file

@ -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<u8>) -> 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<Option<Box<[u8]>>> {
info!(?key, "load cache");
let Some(cache_location) = self.get_cache_entry(key).context("getting cache entry")? else {
// cache miss
return Ok(None);