[Pkg-owncloud-commits] [owncloud-client] 239/333: Log the processed items to a logfile.

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 086dd07d6977c91370713f6885f42cdb740d1810
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Wed Mar 26 18:10:59 2014 +0100

    Log the processed items to a logfile.
---
 src/mirall/folder.cpp | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index 221bb47..dfb94bb 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -26,6 +26,7 @@
 #include "mirall/utility.h"
 #include "mirall/clientproxy.h"
 #include "mirall/syncengine.h"
+#include "mirall/syncrunfilelog.h"
 
 #include "creds/abstractcredentials.h"
 
@@ -307,11 +308,21 @@ void Folder::bubbleUpSyncResult()
     SyncFileItem firstItemRenamed;
     Logger *logger = Logger::instance();
 
+    SyncRunFileLog syncFileLog;
+
+    syncFileLog.start( _engine->stopWatch() );
+
+    QElapsedTimer timer;
+    timer.start();
+
     foreach (const SyncFileItem &item, _syncResult.syncFileItemVector() ) {
+        // Log the item
+        syncFileLog.logItem( item );
+
+        // and process the item to the gui
         if( item._status == SyncFileItem::FatalError || item._status == SyncFileItem::NormalError ) {
             slotSyncError( tr("%1: %2").arg(item._file, item._errorString) );
             logger->postOptionalGuiLog(item._file, item._errorString);
-
         } else {
             // add new directories or remove gone away dirs to the watcher
             if (item._isDirectory && item._instruction == CSYNC_INSTRUCTION_NEW ) {
@@ -359,7 +370,9 @@ void Folder::bubbleUpSyncResult()
             }
         }
     }
+    syncFileLog.close();
 
+    qDebug() << "Processing result list and logging took " << timer.elapsed() << " Milliseconds.";
     _syncResult.setWarnCount(ignoredItems);
 
     createGuiLog( firstItemNew._file,     FILE_STATUS_NEW, newItems );
@@ -644,12 +657,14 @@ void Folder::slotCsyncUnavailable()
 void Folder::slotSyncFinished()
 {
     qDebug() << "-> CSync Finished slot with error " << _csyncError << "warn count" << _syncResult.warnCount();
+
+    bubbleUpSyncResult();
+
     _engine.reset(0);
     // _watcher->setEventsEnabledDelayed(2000);
     _pollTimer.start();
     _timeSinceLastSync.restart();
 
-    bubbleUpSyncResult();
 
     if (_csyncError) {
         _syncResult.setStatus(SyncResult::Error);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list