From 267813e1d71fe053742dbee11c30ea5004e2102b Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 20 Feb 2017 13:11:23 +0100 Subject: Debug output --- common/synchronizer.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index a8af114..57c5d90 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp @@ -371,8 +371,12 @@ KAsync::Job Synchronizer::processRequest(const SyncRequest &request) KAsync::Job Synchronizer::processSyncQueue() { - if (mSyncRequestQueue.isEmpty() || mSyncInProgress) { - SinkTraceCtx(mLogCtx) << "Sync still in progress or nothing to do."; + if (mSyncRequestQueue.isEmpty()) { + SinkLogCtx(mLogCtx) << "All requests processed."; + return KAsync::null(); + } + if (mSyncInProgress) { + SinkTraceCtx(mLogCtx) << "Sync still in progress."; return KAsync::null(); } //Don't process any new requests until we're done with the pending ones. @@ -485,7 +489,7 @@ KAsync::Job Synchronizer::replay(const QByteArray &type, const QByteArray oldRemoteId = syncStore().resolveLocalId(type, uid); //oldRemoteId can be empty if the resource implementation didn't return a remoteid } - SinkTraceCtx(mLogCtx) << "Replaying " << key << type << uid << oldRemoteId; + SinkLogCtx(mLogCtx) << "Replaying: " << key << "Type: " << type << "Uid: " << uid << "Rid: " << oldRemoteId << "Revision: " << metadataBuffer->revision(); KAsync::Job job = KAsync::null(); //TODO This requires supporting every domain type here as well. Can we solve this better so we can do the dispatch somewhere centrally? -- cgit v1.2.3