From da2b049e248c1ad7efeb53685158a205335e4e36 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 7 Jul 2016 22:23:49 +0200 Subject: A new debug system. Instead of a single #define as debug area the new system allows for an identifier for each debug message with the structure component.area. The component is a dot separated identifier of the runtime component, such as the process or the plugin. The area is the code component, and can be as such defined at compiletime. The idea of this system is that it becomes possible to i.e. look at the output of all messages in the query subsystem of a specific resource (something that happens in the client process, but in the resource-specific subcomponent). The new macros are supposed to be less likely to clash with other names, hence the new names. --- common/messagequeue.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/messagequeue.cpp') diff --git a/common/messagequeue.cpp b/common/messagequeue.cpp index b9f11f8..a6e44e3 100644 --- a/common/messagequeue.cpp +++ b/common/messagequeue.cpp @@ -3,6 +3,8 @@ #include #include +SINK_DEBUG_AREA("messagequeue") + static KAsync::Job waitForCompletion(QList> &futures) { auto context = new QObject; @@ -128,7 +130,7 @@ KAsync::Job MessageQueue::dequeueBatch(int maxBatchSize, const std::functi return false; }, [](const Sink::Storage::Error &error) { - ErrorMsg() << "Error while retrieving value" << error.message; + SinkError() << "Error while retrieving value" << error.message; // errorHandler(Error(error.store, error.code, error.message)); }); @@ -164,7 +166,7 @@ bool MessageQueue::isEmpty() } return true; }, - [](const Sink::Storage::Error &error) { ErrorMsg() << "Error while checking if empty" << error.message; }); + [](const Sink::Storage::Error &error) { SinkError() << "Error while checking if empty" << error.message; }); } return count == 0; } -- cgit v1.2.3