Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Larch <anna@nextcloud.com>2021-03-03 11:33:53 +0300
committerAnna Larch <anna@nextcloud.com>2021-03-09 18:39:05 +0300
commitcc15c397de55c271f8e56e93b900ffce15bed7d2 (patch)
tree1a4ff0da70e726c0ce3591f6042ce601707567aa /lib/Service
parenta1abe625981f9ca2b643cd2b8dfe5777f82699a4 (diff)
Add logging to sync
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'lib/Service')
-rw-r--r--lib/Service/Sync/ImapToDbSynchronizer.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Service/Sync/ImapToDbSynchronizer.php b/lib/Service/Sync/ImapToDbSynchronizer.php
index 83ed3a5a7..3132aad06 100644
--- a/lib/Service/Sync/ImapToDbSynchronizer.php
+++ b/lib/Service/Sync/ImapToDbSynchronizer.php
@@ -114,10 +114,10 @@ class ImapToDbSynchronizer {
int $criteria = Horde_Imap_Client::SYNC_NEWMSGSUIDS | Horde_Imap_Client::SYNC_FLAGSUIDS | Horde_Imap_Client::SYNC_VANISHEDUIDS): void {
foreach ($this->mailboxMapper->findAll($account) as $mailbox) {
if (!$mailbox->isInbox() && !$mailbox->getSyncInBackground()) {
- $logger->debug("Skipping mailbox sync for " . $mailbox->getName());
+ $logger->debug("Skipping mailbox sync for " . $mailbox->getId());
continue;
}
-
+ $logger->debug("Syncing " . $mailbox->getId());
$this->sync(
$account,
$mailbox,
@@ -215,19 +215,23 @@ class ImapToDbSynchronizer {
|| $mailbox->getSyncNewToken() === null
|| $mailbox->getSyncChangedToken() === null
|| $mailbox->getSyncVanishedToken() === null) {
+ $logger->debug("Running initial sync for " . $mailbox->getId());
$this->runInitialSync($account, $mailbox, $logger);
} else {
try {
+ $logger->debug("Running partial sync for " . $mailbox->getId());
$this->runPartialSync($account, $mailbox, $logger, $criteria, $knownUids);
} catch (UidValidityChangedException $e) {
- $logger->warning('Mailbox UID validity changed. Wiping cache and performing full sync.');
+ $logger->warning('Mailbox UID validity changed. Wiping cache and performing full sync for ' . $mailbox->getId());
$this->resetCache($account, $mailbox);
+ $logger->debug("Running initial sync for " . $mailbox->getId() . " after cache reset");
$this->runInitialSync($account, $mailbox, $logger);
} catch (MailboxDoesNotSupportModSequencesException $e) {
- $logger->warning('Mailbox does not support mod-sequences error occured. Wiping cache and performing full sync.', [
+ $logger->warning('Mailbox does not support mod-sequences error occured. Wiping cache and performing full sync for ' . $mailbox->getId(), [
'exception' => $e,
]);
$this->resetCache($account, $mailbox);
+ $logger->debug("Running initial sync for " . $mailbox->getId() . " after cache reset - no mod-sequences error");
$this->runInitialSync($account, $mailbox, $logger);
}
}