Skip to content

Commit

Permalink
refactor: log IMAP connection type on connection failure
Browse files Browse the repository at this point in the history
Otherwise it is impossible to distinguish between
failure to establish INBOX and DeltaChat folder connections
in the logs.
  • Loading branch information
link2xt committed May 24, 2024
1 parent 0e1f62a commit 518d5bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 518d5bc

Please sign in to comment.