mirror of https://github.com/M66B/FairEmail.git
Reduced logging
This commit is contained in:
parent
b51d0b5031
commit
c9bf2d9a4d
|
@ -1137,6 +1137,7 @@ class Core {
|
||||||
downloadMessage(context, account, folder, istore, ifolder, imessage, message.id, state, stats);
|
downloadMessage(context, account, folder, istore, ifolder, imessage, message.id, state, stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!stats.isEmpty())
|
||||||
EntityLog.log(context, folder.name + " fetch stats " + stats);
|
EntityLog.log(context, folder.name + " fetch stats " + stats);
|
||||||
} finally {
|
} finally {
|
||||||
((IMAPMessage) imessage).invalidateHeaders();
|
((IMAPMessage) imessage).invalidateHeaders();
|
||||||
|
@ -2378,6 +2379,7 @@ class Core {
|
||||||
db.folder().setFolderError(folder.id, null);
|
db.folder().setFolderError(folder.id, null);
|
||||||
|
|
||||||
stats.total = (SystemClock.elapsedRealtime() - search);
|
stats.total = (SystemClock.elapsedRealtime() - search);
|
||||||
|
|
||||||
EntityLog.log(context, folder.name + " sync stats " + stats);
|
EntityLog.log(context, folder.name + " sync stats " + stats);
|
||||||
} finally {
|
} finally {
|
||||||
Log.i(folder.name + " end sync state=" + state);
|
Log.i(folder.name + " end sync state=" + state);
|
||||||
|
@ -4098,8 +4100,8 @@ class Core {
|
||||||
private static class SyncStats {
|
private static class SyncStats {
|
||||||
long search_ms;
|
long search_ms;
|
||||||
int flags;
|
int flags;
|
||||||
int uids;
|
|
||||||
long flags_ms;
|
long flags_ms;
|
||||||
|
int uids;
|
||||||
long uids_ms;
|
long uids_ms;
|
||||||
int headers;
|
int headers;
|
||||||
long headers_ms;
|
long headers_ms;
|
||||||
|
@ -4107,6 +4109,19 @@ class Core {
|
||||||
long attachments;
|
long attachments;
|
||||||
long total;
|
long total;
|
||||||
|
|
||||||
|
boolean isEmpty() {
|
||||||
|
return (search_ms == 0 &&
|
||||||
|
flags == 0 &&
|
||||||
|
flags_ms == 0 &&
|
||||||
|
uids == 0 &&
|
||||||
|
uids_ms == 0 &&
|
||||||
|
headers == 0 &&
|
||||||
|
headers_ms == 0 &&
|
||||||
|
content == 0 &&
|
||||||
|
attachments == 0 &&
|
||||||
|
total == 0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "search=" + search_ms + " ms" +
|
return "search=" + search_ms + " ms" +
|
||||||
|
|
Loading…
Reference in New Issue