Extended debug info

pull/213/head
M66B 1 year ago
parent 379bb34723
commit ea500bbaa9

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

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

Loading…
Cancel
Save