From: Olivier Goffart Date: Wed, 21 Oct 2015 23:13:35 +0000 (+0200) Subject: Folder: set csync verbosity to 0 if the Logger is not there X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1517 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a608b4e9e0cdb38939873c348ca5def96242c1ec;p=nextcloud-desktop.git 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) --- 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.";