[Pkg-owncloud-commits] [owncloud-client] 50/121: Setup csync logging earlier (#4991)
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Jul 28 15:31:56 UTC 2016
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 07dea72c37d86438e7765e7422d8ba93c83f4d7d
Author: ckamm <mail at ckamm.de>
Date: Tue Jun 21 09:58:53 2016 +0200
Setup csync logging earlier (#4991)
We were missing some csync related log output during startup.
Discovered in #4967
---
src/gui/application.cpp | 12 ++++++++++++
src/gui/folder.cpp | 10 ----------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index 702cdbc..aaa2ca6 100644
--- a/src/gui/application.cpp
+++ b/src/gui/application.cpp
@@ -139,6 +139,7 @@ Application::Application(int &argc, char **argv) :
setupTranslations();
// Setup global excludes
+ qDebug() << "Loading global exclude list";
ConfigFile cfg;
ExcludedFiles& excludes = ExcludedFiles::instance();
excludes.addExcludeFilePath( cfg.excludeFile(ConfigFile::SystemScope) );
@@ -335,6 +336,14 @@ void Application::slotownCloudWizardDone( int res )
}
}
+static void csyncLogCatcher(int /*verbosity*/,
+ const char */*function*/,
+ const char *buffer,
+ void */*userdata*/)
+{
+ Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
+}
+
void Application::setupLogging()
{
// might be called from second instance
@@ -350,6 +359,9 @@ void Application::setupLogging()
.arg(property("ui_lang").toString())
.arg(_theme->version());
+ // Setup CSYNC logging to forward to our own logger
+ csync_set_log_callback( csyncLogCatcher );
+ csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
}
void Application::slotUseMonoIconsChanged(bool)
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 66bc258..1fa78ff 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -46,14 +46,6 @@
namespace OCC {
-static void csyncLogCatcher(int /*verbosity*/,
- const char */*function*/,
- const char *buffer,
- void */*userdata*/)
-{
- Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
-}
-
Folder::Folder(const FolderDefinition& definition,
AccountState* accountState,
@@ -730,8 +722,6 @@ void Folder::startSync(const QStringList &pathList)
if (proxyDirty()) {
setProxyDirty(false);
}
- csync_set_log_callback( csyncLogCatcher );
- 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