Reduced logging

This commit is contained in:
M66B 2020-12-08 10:45:31 +01:00
parent b126296210
commit 1a7f94c5df
1 changed files with 7 additions and 3 deletions

View File

@ -503,14 +503,18 @@ class Core {
// Delete: NO [CANNOT] STORE It's not possible to perform specified operation
// Delete: NO [UNAVAILABLE] EXPUNGE Backend error
// Delete: NO mailbox selected READ-ONLY
String msg = "Unrecoverable operation=" + op.name + " tries=" + op.tries + " created=" + new Date(op.created);
EntityLog.log(context, msg +
" folder=" + folder.id + ":" + folder.name +
" message=" + (message == null ? null : message.id + ":" + message.subject) +
" reason=" + Log.formatThrowable(ex, false));
if (op.tries > 1 ||
ex.getCause() instanceof BadCommandException ||
ex.getCause() instanceof CommandFailedException)
if (ifolder != null && ifolder.isOpen() &&
(op.tries > 1 ||
ex.getCause() instanceof BadCommandException ||
ex.getCause() instanceof CommandFailedException))
Log.e(new Throwable(msg, ex));
try {