mirror of
https://github.com/etesync/android
synced 2025-06-24 17:08:50 +00:00
Improve logging when applying entries.
This commit is contained in:
parent
5ec0dd45b5
commit
268cd98b7b
@ -228,17 +228,20 @@ abstract public class SyncManager {
|
|||||||
abstract protected void processSyncEntry(SyncEntry cEntry) throws IOException, ContactsStorageException, CalendarStorageException, InvalidCalendarException;
|
abstract protected void processSyncEntry(SyncEntry cEntry) throws IOException, ContactsStorageException, CalendarStorageException, InvalidCalendarException;
|
||||||
|
|
||||||
private void applyEntries(List<JournalEntryManager.Entry> entries, boolean noDelete) throws CalendarStorageException, InvalidCalendarException, ContactsStorageException, IOException {
|
private void applyEntries(List<JournalEntryManager.Entry> entries, boolean noDelete) throws CalendarStorageException, InvalidCalendarException, ContactsStorageException, IOException {
|
||||||
|
String strTotal = String.valueOf(entries.size());
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
for (JournalEntryManager.Entry entry : entries) {
|
for (JournalEntryManager.Entry entry : entries) {
|
||||||
if (Thread.interrupted())
|
if (Thread.interrupted())
|
||||||
return;
|
return;
|
||||||
|
i++;
|
||||||
App.log.info("Processing " + entry.toString());
|
App.log.info("Processing (" + String.valueOf(i) + "/" + strTotal + ") " + entry.toString());
|
||||||
|
|
||||||
SyncEntry cEntry = SyncEntry.fromJournalEntry(settings.password(), entry);
|
SyncEntry cEntry = SyncEntry.fromJournalEntry(settings.password(), entry);
|
||||||
if (noDelete && cEntry.isAction(SyncEntry.Actions.DELETE)) {
|
if (noDelete && cEntry.isAction(SyncEntry.Actions.DELETE)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
App.log.info("Processing resource for journal entry " + entry.getUuid());
|
App.log.info("Processing resource for journal entry");
|
||||||
processSyncEntry(cEntry);
|
processSyncEntry(cEntry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,7 +257,7 @@ abstract public class SyncManager {
|
|||||||
|
|
||||||
protected void fetchEntries() throws Exceptions.HttpException, ContactsStorageException, CalendarStorageException, Exceptions.IntegrityException {
|
protected void fetchEntries() throws Exceptions.HttpException, ContactsStorageException, CalendarStorageException, Exceptions.IntegrityException {
|
||||||
remoteEntries = journal.getEntries(settings.password(), remoteCTag);
|
remoteEntries = journal.getEntries(settings.password(), remoteCTag);
|
||||||
|
|
||||||
App.log.info("Fetched " + String.valueOf(remoteEntries.size()) + " entries");
|
App.log.info("Fetched " + String.valueOf(remoteEntries.size()) + " entries");
|
||||||
|
|
||||||
if (!remoteEntries.isEmpty()) {
|
if (!remoteEntries.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user