[Pkg-owncloud-commits] [owncloud-client] 179/332: Engine: Do not reset the csync log callback in the engine

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:56 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 26e17f58efb3f88fbd38ce64bcf8dd46b21c2b44
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Jul 7 17:01:34 2014 +0200

    Engine: Do not reset the csync log callback in the engine
    
    It is already set in Folder and we don't want to use the Logger
    in command line clients
---
 src/mirall/folder.cpp           |  9 +++++++++
 src/mirall/syncengine.cpp       | 10 ----------
 src/mirall/syncengine.h         |  5 -----
 src/owncloudcmd/owncloudcmd.cpp |  2 --
 4 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/src/mirall/folder.cpp b/src/mirall/folder.cpp
index f2c8b37..aac7d1c 100644
--- a/src/mirall/folder.cpp
+++ b/src/mirall/folder.cpp
@@ -42,6 +42,15 @@
 
 namespace Mirall {
 
+static void csyncLogCatcher(int /*verbosity*/,
+                        const char */*function*/,
+                        const char *buffer,
+                        void */*userdata*/)
+{
+    Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
+}
+
+
 Folder::Folder(const QString &alias, const QString &path, const QString& secondPath, QObject *parent)
     : QObject(parent)
       , _path(path)
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index 6ce1896..ddfe6ea 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -16,7 +16,6 @@
 #include "mirall/syncengine.h"
 #include "mirall/account.h"
 #include "mirall/theme.h"
-#include "mirall/logger.h"
 #include "owncloudpropagator.h"
 #include "syncjournaldb.h"
 #include "syncjournalfilerecord.h"
@@ -43,14 +42,6 @@
 
 namespace Mirall {
 
-void csyncLogCatcher(int /*verbosity*/,
-                     const char */*function*/,
-                     const char *buffer,
-                     void */*userdata*/)
-{
-  Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
-}
-
 bool SyncEngine::_syncRunning = false;
 
 SyncEngine::SyncEngine(CSYNC *ctx, const QString& localPath, const QString& remoteURL, const QString& remotePath, Mirall::SyncJournalDb* journal)
@@ -504,7 +495,6 @@ void SyncEngine::startSync()
     // }
 
     // csync_set_auth_callback( _csync_ctx, getauth );
-    csync_set_log_callback( csyncLogCatcher );
     //csync_set_log_level( 11 ); don't set the loglevel here, it shall be done by folder.cpp or owncloudcmd.cpp
     int timeout = OwncloudPropagator::httpTimeout();
     csync_set_module_property(_csync_ctx, "timeout", &timeout);
diff --git a/src/mirall/syncengine.h b/src/mirall/syncengine.h
index f782917..c4a9af7 100644
--- a/src/mirall/syncengine.h
+++ b/src/mirall/syncengine.h
@@ -40,11 +40,6 @@ class SyncJournalDb;
 
 class OwncloudPropagator;
 
-void OWNCLOUDSYNC_EXPORT csyncLogCatcher(int /*verbosity*/,
-                     const char */*function*/,
-                     const char *buffer,
-                     void */*userdata*/);
-
 class OWNCLOUDSYNC_EXPORT SyncEngine : public QObject
 {
     Q_OBJECT
diff --git a/src/owncloudcmd/owncloudcmd.cpp b/src/owncloudcmd/owncloudcmd.cpp
index 23a110f..ad7a4ae 100644
--- a/src/owncloudcmd/owncloudcmd.cpp
+++ b/src/owncloudcmd/owncloudcmd.cpp
@@ -24,7 +24,6 @@
 
 #include "mirall/syncengine.h"
 #include "mirall/syncjournaldb.h"
-#include "mirall/logger.h"
 #include "csync.h"
 #include "mirall/clientproxy.h"
 #include "mirall/account.h"
@@ -169,7 +168,6 @@ int main(int argc, char **argv) {
     }
 
     csync_set_log_level(options.silent ? 1 : 11);
-    Logger::instance()->setLogFile("-");
 
     csync_set_userdata(_csync_ctx, &options);
     csync_set_auth_callback( _csync_ctx, getauth );

-- 
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