From 518d5bc4c7f604c2f2d7d7fa1075666fba084da9 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 23 May 2024 21:48:10 +0000 Subject: [PATCH] refactor: log IMAP connection type on connection failure Otherwise it is impossible to distinguish between failure to establish INBOX and DeltaChat folder connections in the logs. --- src/scheduler.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scheduler.rs b/src/scheduler.rs index 5df9a53a1..6b97e07b0 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -407,7 +407,7 @@ async fn inbox_loop( } else { match connection.prepare(&ctx).await { Err(err) => { - warn!(ctx, "Failed to prepare connection: {:#}.", err); + warn!(ctx, "Failed to prepare INBOX connection: {:#}.", err); continue; } Ok(session) => session, @@ -714,7 +714,10 @@ async fn simple_imap_loop( } else { match connection.prepare(&ctx).await { Err(err) => { - warn!(ctx, "Failed to prepare connection: {:#}.", err); + warn!( + ctx, + "Failed to prepare {folder_meaning} connection: {err:#}." + ); continue; } Ok(session) => session,