Improved logging

pull/201/head
M66B 3 years ago
parent a8b12a0c92
commit 365832355b

@ -1254,9 +1254,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if ("Still here".equals(message) && if ("Still here".equals(message) &&
!account.isTransient(ServiceSynchronize.this)) { !account.isTransient(ServiceSynchronize.this)) {
long now = new Date().getTime(); long elapsed = new Date().getTime() - start;
if (now - start < STILL_THERE_THRESHOLD) if (elapsed < STILL_THERE_THRESHOLD)
optimizeAccount(account, message); optimizeAccount(account, "'" + message + "'" +
" elapsed=" + elapsed + " ms");
} }
} else } else
try { try {
@ -2248,7 +2249,9 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
DB db = DB.getInstance(this); DB db = DB.getInstance(this);
int pollInterval = getPollInterval(this); int pollInterval = getPollInterval(this);
EntityLog.log(this, "Auto optimize account=" + account.name + " poll interval=" + pollInterval); EntityLog.log(this, account.name + " auto optimize" +
" reason=" + reason +
" poll interval=" + pollInterval);
if (pollInterval == 0) { if (pollInterval == 0) {
try { try {
db.beginTransaction(); db.beginTransaction();

Loading…
Cancel
Save