From 26dd10828fef73145b204383e3db4f5918936263 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 29 Mar 2022 21:17:53 +0200 Subject: [PATCH] Added tag to protocol dump --- app/src/main/java/eu/faircode/email/Core.java | 2 +- app/src/main/java/eu/faircode/email/EmailService.java | 6 +++--- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index b76b478e48..a5ef96ede3 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -534,7 +534,7 @@ class Core { for (TupleOperationEx s : similar.keySet()) ops.remove(s); } catch (Throwable ex) { - iservice.dump(); + iservice.dump(account.name + "/" + folder.name); if (ex instanceof OperationCanceledException) Log.i(folder.name, ex); else diff --git a/app/src/main/java/eu/faircode/email/EmailService.java b/app/src/main/java/eu/faircode/email/EmailService.java index 4905bfc0e6..a3c06d2505 100644 --- a/app/src/main/java/eu/faircode/email/EmailService.java +++ b/app/src/main/java/eu/faircode/email/EmailService.java @@ -885,11 +885,11 @@ public class EmailService implements AutoCloseable { } } - public void dump() { - EntityLog.log(context, EntityLog.Type.Protocol, "Dump start"); + public void dump(String tag) { + EntityLog.log(context, EntityLog.Type.Protocol, "Dump start " + tag); while (breadcrumbs != null && !breadcrumbs.isEmpty()) EntityLog.log(context, EntityLog.Type.Protocol, "Dump " + breadcrumbs.pop()); - EntityLog.log(context, EntityLog.Type.Protocol, "Dump end"); + EntityLog.log(context, EntityLog.Type.Protocol, "Dump end" + tag); } private static class SocketFactoryService extends SocketFactory { diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index da9cfe8164..c2cb86cd33 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -2227,7 +2227,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences Log.i(account.name + " done state=" + state); } catch (Throwable ex) { last_fail = ex; - iservice.dump(); + iservice.dump(account.name); Log.e(account.name, ex); EntityLog.log(this, EntityLog.Type.Account, account, account.name + " connect " + Log.formatThrowable(ex, false));