diff --git a/Cargo.toml b/Cargo.toml index 0845a84..d24d130 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ futures = { version = "0.3.28", optional = true} thiserror = { version = "1.0.43", optional = true } ureq = { version = "2.7.1", optional = true, features = ["native-tls", "json"] } native-tls = { version = "0.2.11", optional = true } +log = "0.4.19" [features] default = ["online"] diff --git a/src/api/sync.rs b/src/api/sync.rs index f004e71..a8aa5ad 100644 --- a/src/api/sync.rs +++ b/src/api/sync.rs @@ -109,6 +109,9 @@ impl ApiBuilder { pub fn new() -> Self { let cache = Cache::default(); let token_filename = cache.token_path(); + if !token_filename.exists() { + log::info!("Token file not found {path:?}"); + } let token = match std::fs::read_to_string(token_filename) { Ok(token_content) => { let token_content = token_content.trim(); diff --git a/src/api/tokio.rs b/src/api/tokio.rs index 584b694..03afe9b 100644 --- a/src/api/tokio.rs +++ b/src/api/tokio.rs @@ -97,6 +97,9 @@ impl ApiBuilder { pub fn new() -> Self { let cache = Cache::default(); let token_filename = cache.token_path(); + if !token_filename.exists() { + log::info!("Token file not found {path:?}"); + } let token = match std::fs::read_to_string(token_filename) { Ok(token_content) => { let token_content = token_content.trim();