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

This commit is contained in:
Daniel García committed 2018-12-06 20:35:25 +01:00
1 parent 259a2f2982
commit 2fde4e6933
13 files changed
+146 -29

No files matched your search

+2 -2
View File
@@ -78,11 +78,11 @@ impl Attachment {
Ok(_) => break,
Err(err) => {
if retries < 1 {
println!("ERROR: Failed with 10 retries");
error!("Failed with 10 retries");
return Err(err)
} else {
retries -= 1;
println!("Had to retry! Retries left: {}", retries);
info!("Had to retry! Retries left: {}", retries);
thread::sleep(time::Duration::from_millis(500));
continue
}