mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 19:34:15 +01:00
Added logging
This commit is contained in:
@@ -151,6 +151,9 @@ public class ServiceSend extends LifecycleService {
|
||||
db.operation().deleteOperation(op.id);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(outbox.name, ex);
|
||||
EntityLog.log(
|
||||
ServiceSend.this,
|
||||
outbox.name + " " + Helper.formatThrowable(ex));
|
||||
|
||||
db.operation().setOperationError(op.id, Helper.formatThrowable(ex));
|
||||
if (message != null)
|
||||
@@ -363,8 +366,9 @@ public class ServiceSend extends LifecycleService {
|
||||
Address[] to = imessage.getAllRecipients();
|
||||
itransport.sendMessage(imessage, to);
|
||||
long time = new Date().getTime();
|
||||
EntityLog.log(this, "Sent via " + ident.host + "/" + ident.user +
|
||||
" to " + TextUtils.join(", ", to));
|
||||
EntityLog.log(this,
|
||||
"Sent via " + ident.host + "/" + ident.user +
|
||||
" to " + TextUtils.join(", ", to));
|
||||
|
||||
// Append replied/forwarded text
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -429,6 +433,8 @@ public class ServiceSend extends LifecycleService {
|
||||
throw ex;
|
||||
}
|
||||
|
||||
EntityLog.log(this, ident.name + " last attempt: " + new Date(message.last_attempt));
|
||||
|
||||
long now = new Date().getTime();
|
||||
long delayed = now - message.last_attempt;
|
||||
if (delayed > IDENTITY_ERROR_AFTER * 60 * 1000L || ex instanceof SendFailedException) {
|
||||
|
||||
Reference in New Issue
Block a user