mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 23:16:30 +03:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user