diff --git a/app/src/main/java/eu/faircode/email/Log.java b/app/src/main/java/eu/faircode/email/Log.java index 8fda05c318..61ebf310ce 100644 --- a/app/src/main/java/eu/faircode/email/Log.java +++ b/app/src/main/java/eu/faircode/email/Log.java @@ -2810,6 +2810,14 @@ public class Log { long from = new Date().getTime() - 24 * 3600 * 1000L; DateFormat TF = Helper.getTimeInstance(context); + for (EntityLog entry : db.log().getLogs(from, null)) + if (entry.data != null && entry.data.contains("backoff=")) + size += write(os, String.format("%s %s\r\n", + TF.format(entry.time), + entry.data)); + + size += write(os, "\r\n"); + for (EntityLog entry : db.log().getLogs(from, null)) { size += write(os, String.format("%s [%d:%d:%d:%d:%d] %s\r\n", TF.format(entry.time), diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 19a7339276..6172b61417 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -2650,6 +2650,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences if (state.isRunning()) { long now = new Date().getTime(); + ConnectivityManager cm = Helper.getSystemService(this, ConnectivityManager.class); boolean logarithmic_backoff = prefs.getBoolean("logarithmic_backoff", true); int max_backoff_power = prefs.getInt("max_backoff_power", DEFAULT_BACKOFF_POWER - 3); int max_backoff = (int) Math.pow(2, max_backoff_power + 3); @@ -2686,6 +2687,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences " missing=" + (missing / 1000L) + " compensate=" + compensate + " backoff=" + backoff + "/" + max_backoff + + " network=" + (cm == null ? null : cm.getActiveNetworkInfo()) + " host=" + account.host + " ex=" + Log.formatThrowable(last_fail, false); if (compensate > 2) @@ -2708,7 +2710,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences EntityLog.log(this, EntityLog.Type.Account, account, account.name + " backoff=" + backoff + "/" + max_backoff + " recently=" + recently + "x" + - " logarithmic=" + logarithmic_backoff); + " logarithmic=" + logarithmic_backoff + + " network=" + (cm == null ? null : cm.getActiveNetworkInfo()) + + " ex=" + Log.formatThrowable(last_fail, false)); if (logarithmic_backoff) { if (backoff < max_backoff)