Reduce logging

This commit is contained in:
M66B 2018-12-11 19:02:41 +01:00
parent c4e2118ad7
commit 1e0d655bb7
1 changed files with 3 additions and 2 deletions

View File

@ -819,12 +819,13 @@ public class ServiceSynchronize extends LifecycleService {
try {
wlAccount.acquire();
String type = (e.getMessageType() == StoreEvent.ALERT ? "alert" : "notice");
EntityLog.log(ServiceSynchronize.this, account.name + " " + type + ": " + e.getMessage());
if (e.getMessageType() == StoreEvent.ALERT) {
EntityLog.log(ServiceSynchronize.this, account.name + " " + type + ": " + e.getMessage());
db.account().setAccountError(account.id, e.getMessage());
reportError(account, null, new AlertException(e.getMessage()));
state.error();
}
} else
Log.i(Helper.TAG, account.name + " " + type + ": " + e.getMessage());
} finally {
wlAccount.release();
}