From 470203f1c09fa1811ae2859520c168901d5fa6cd Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Fri, 6 Jan 2017 15:15:22 +0100 Subject: Debug output --- common/synchronizer.cpp | 3 ++- common/synchronizer.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index ed493dc..df36ef0 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp @@ -293,6 +293,7 @@ KAsync::Job Synchronizer::processSyncQueue() n.message = "Synchronization has started."; n.code = ApplicationDomain::BusyStatus; emit notify(n); + SinkLogCtx(mLogCtx) << "Synchronizing " << request.query.type(); }).then(synchronizeWithSource(request.query)).syncThen([this] { //Commit after every request, so implementations only have to commit more if they add a lot of data. commit(); @@ -367,7 +368,7 @@ void Synchronizer::commit() Sink::Storage::DataStore::DataStore::Transaction &Synchronizer::syncTransaction() { if (!mSyncTransaction) { - SinkTrace() << "Starting transaction"; + SinkTrace() << "Starting transaction on sync store."; mSyncTransaction = mSyncStorage.createTransaction(Sink::Storage::DataStore::DataStore::ReadWrite); } return mSyncTransaction; diff --git a/common/synchronizer.h b/common/synchronizer.h index 2c56d6a..a0a432c 100644 --- a/common/synchronizer.h +++ b/common/synchronizer.h @@ -166,11 +166,12 @@ protected: */ virtual QList getSyncRequests(const Sink::QueryBase &query); +protected: + Sink::Log::Context mLogCtx; private: void modifyIfChanged(Storage::EntityStore &store, const QByteArray &bufferType, const QByteArray &sinkId, const Sink::ApplicationDomain::ApplicationDomainType &entity); KAsync::Job processSyncQueue(); - Sink::Log::Context mLogCtx; Sink::ResourceContext mResourceContext; Sink::Storage::EntityStore::Ptr mEntityStore; QSharedPointer mSyncStore; -- cgit v1.2.3