1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-29 14:04:49 +00:00

Implemented proper logging, with support for file logging, timestamp and syslog (this last one is untested)

This commit is contained in:
Daniel García 2018-12-06 20:35:25 +01:00
commit 2fde4e6933
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
13 changed files with 146 additions and 29 deletions

View file

@ -43,7 +43,7 @@ fn get_icon (domain: &str) -> Vec<u8> {
icon
},
Err(e) => {
println!("Error downloading icon: {:?}", e);
error!("Error downloading icon: {:?}", e);
get_fallback_icon()
}
}
@ -71,7 +71,7 @@ fn get_icon_url(domain: &str) -> String {
}
fn download_icon(url: &str) -> Result<Vec<u8>, reqwest::Error> {
println!("Downloading icon for {}...", url);
info!("Downloading icon for {}...", url);
let mut res = reqwest::get(url)?;
res = res.error_for_status()?;
@ -105,7 +105,7 @@ fn get_fallback_icon() -> Vec<u8> {
icon
},
Err(e) => {
println!("Error downloading fallback icon: {:?}", e);
error!("Error downloading fallback icon: {:?}", e);
vec![]
}
}