From a1ef32170da0055c0cfe3f1c095832016dcb230e Mon Sep 17 00:00:00 2001 From: Hocuri Date: Thu, 22 Apr 2021 17:40:19 +0200 Subject: [PATCH] Make logging less verbose --- src/imap/scan_folders.rs | 10 ++-------- src/job.rs | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/imap/scan_folders.rs b/src/imap/scan_folders.rs index 304a4fdd8..02db7682e 100644 --- a/src/imap/scan_folders.rs +++ b/src/imap/scan_folders.rs @@ -61,14 +61,8 @@ impl Imap { spam_folder = Some(folder.name().to_string()); } - if watched_folders.contains(&foldername.to_string()) { - info!( - context, - "Not scanning folder {} as it is watched anyway", foldername - ); - } else { - info!(context, "Scanning folder: {}", foldername); - + // Don't scan folders that are watched anyway + if !watched_folders.contains(&foldername.to_string()) { if let Err(e) = self.fetch_new_messages(context, foldername, false).await { warn!(context, "Can't fetch new msgs in scanned folder: {:#}", e); } diff --git a/src/job.rs b/src/job.rs index d362abc26..c309b7cb5 100644 --- a/src/job.rs +++ b/src/job.rs @@ -1118,7 +1118,7 @@ pub(crate) async fn perform_job(context: &Context, mut connection: Connection<'_ if let Err(err) = res { warn!( context, - "{} removes job {} as it failed with error {:?}", &connection, job, err + "{} removes job {} as it failed with error {:#}", &connection, job, err ); } else { info!(