From a608b4e9e0cdb38939873c348ca5def96242c1ec Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 22 Oct 2015 01:13:35 +0200 Subject: [PATCH] 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 226e501bb..fbd6a2adc 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."; -- 2.30.2