From 10bb4feef577b6800c64fb8060eb5fdc950f10dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Sat, 14 Jun 2025 00:07:43 +0000 Subject: [PATCH] logging improvements --- .vscode/launch.json | 1 + src/main.rs | 1 + src/sharry/api.rs | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b82e312..f3e4bac 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -22,6 +22,7 @@ "args": [ "sharry.yavook.de", "G7RYoWME1W7-pcgipemJcr8-39FcMd92gBu-RgufeHc51z6", + "/lib/x86_64-linux-gnu/libLLVM-14.so", "/lib/x86_64-linux-gnu/liblldb-14.so.1", ], "env": { diff --git a/src/main.rs b/src/main.rs index df2856e..1949c1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -145,6 +145,7 @@ fn main() { match state.upload_chunk(&mut buffer) { Err(e) => { // TODO better error handling (this will just retry endlessly) + // Error 404: Share might have been deleted error!("error: {e:?}"); if let Some(s) = state.rewind() { diff --git a/src/sharry/api.rs b/src/sharry/api.rs index 5e0ed17..3658b9a 100644 --- a/src/sharry/api.rs +++ b/src/sharry/api.rs @@ -1,6 +1,6 @@ use std::fmt; -use log::debug; +use log::trace; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug, Hash)] @@ -19,7 +19,7 @@ impl Uri { pub fn endpoint(&self, endpoint: impl fmt::Display) -> String { let uri = format!("{self}/{endpoint}"); - debug!("endpoint: {uri:?}"); + trace!("endpoint: {uri:?}"); uri }