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 /examples/maildirresource/facade.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 'examples/maildirresource/facade.cpp')
-rw-r--r-- | examples/maildirresource/facade.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/maildirresource/facade.cpp b/examples/maildirresource/facade.cpp index d8fc02d..256b255 100644 --- a/examples/maildirresource/facade.cpp +++ b/examples/maildirresource/facade.cpp | |||
@@ -38,11 +38,11 @@ MaildirResourceMailFacade::MaildirResourceMailFacade(const QByteArray &instanceI | |||
38 | const auto folderPath = parts.join('/'); | 38 | const auto folderPath = parts.join('/'); |
39 | const auto path = folderPath + "/cur/"; | 39 | const auto path = folderPath + "/cur/"; |
40 | 40 | ||
41 | Trace() << "Looking for mail in: " << path << key; | 41 | SinkTrace_("", "maildirfacade") << "Looking for mail in: " << path << key; |
42 | QDir dir(path); | 42 | QDir dir(path); |
43 | const QFileInfoList list = dir.entryInfoList(QStringList() << (key+"*"), QDir::Files); | 43 | const QFileInfoList list = dir.entryInfoList(QStringList() << (key+"*"), QDir::Files); |
44 | if (list.size() != 1) { | 44 | if (list.size() != 1) { |
45 | Warning() << "Failed to find message " << path << key << list.size(); | 45 | SinkWarning_("", "maildirfacade") << "Failed to find message " << path << key << list.size(); |
46 | value.setProperty("mimeMessage", QVariant()); | 46 | value.setProperty("mimeMessage", QVariant()); |
47 | } else { | 47 | } else { |
48 | value.setProperty("mimeMessage", list.at(0).filePath()); | 48 | value.setProperty("mimeMessage", list.at(0).filePath()); |