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.
This commit is contained in:
link2xt
2024-05-23 21:48:10 +00:00
parent 0e1f62a38d
commit 518d5bc4c7

View File

@@ -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,