[Pkg-owncloud-commits] [owncloud-client] 127/484: Folder: set csync verbosity to 0 if the Logger is not there

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:28 UTC 2015


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 a608b4e9e0cdb38939873c348ca5def96242c1ec
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Thu Oct 22 01:13:35 2015 +0200

    Folder: set csync verbosity to 0 if the Logger is not there
    
    csync_log was still accounting for 8% of the local discovery (because
    of vsnprintf and asprintf)
---
 src/gui/folder.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 226e501..fbd6a2a 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -108,7 +108,7 @@ bool Folder::init()
         _csync_ctx = 0;
     } else {
         csync_set_log_callback( csyncLogCatcher );
-        csync_set_log_level( 11 );
+        csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
 
         Q_ASSERT( _accountState );
         _accountState->account()->credentials()->syncContextPreInit(_csync_ctx);
@@ -844,6 +844,7 @@ void Folder::startSync(const QStringList &pathList)
         _clientProxy.setCSyncProxy(_accountState->account()->url(), _csync_ctx);
         setProxyDirty(false);
     }
+    csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
 
     if (isBusy()) {
         qCritical() << "* ERROR csync is still running and new sync requested.";

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