diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-07 22:23:49 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-07 22:23:49 +0200 |
commit | da2b049e248c1ad7efeb53685158a205335e4e36 (patch) | |
tree | 1e7e5e940e9b760b2108081b1d2f3879cebdb0ff /common/remoteidmap.cpp | |
parent | 9bcb822963fc96c94dbe7dcc4134dcd2dac454ff (diff) | |
download | sink-da2b049e248c1ad7efeb53685158a205335e4e36.tar.gz sink-da2b049e248c1ad7efeb53685158a205335e4e36.zip |
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.
Diffstat (limited to 'common/remoteidmap.cpp')
-rw-r--r-- | common/remoteidmap.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/remoteidmap.cpp b/common/remoteidmap.cpp index bbcd641..20a054d 100644 --- a/common/remoteidmap.cpp +++ b/common/remoteidmap.cpp | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | using namespace Sink; | 26 | using namespace Sink; |
27 | 27 | ||
28 | SINK_DEBUG_AREA("remoteidmap") | ||
29 | |||
28 | RemoteIdMap::RemoteIdMap(Sink::Storage::Transaction &transaction) | 30 | RemoteIdMap::RemoteIdMap(Sink::Storage::Transaction &transaction) |
29 | : mTransaction(transaction) | 31 | : mTransaction(transaction) |
30 | { | 32 | { |
@@ -67,7 +69,7 @@ QByteArray RemoteIdMap::resolveLocalId(const QByteArray &bufferType, const QByte | |||
67 | { | 69 | { |
68 | QByteArray remoteId = Index("localid.mapping." + bufferType, mTransaction).lookup(localId); | 70 | QByteArray remoteId = Index("localid.mapping." + bufferType, mTransaction).lookup(localId); |
69 | if (remoteId.isEmpty()) { | 71 | if (remoteId.isEmpty()) { |
70 | Warning() << "Couldn't find the remote id for " << localId; | 72 | SinkWarning() << "Couldn't find the remote id for " << localId; |
71 | return QByteArray(); | 73 | return QByteArray(); |
72 | } | 74 | } |
73 | return remoteId; | 75 | return remoteId; |