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:
parent
259a2f2982
commit
2fde4e6933
13 changed files with 146 additions and 29 deletions
|
@ -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![]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue