Added tag to protocol dump

This commit is contained in:
M66B 2022-03-29 21:17:53 +02:00
parent baaed52144
commit 26dd10828f
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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));