diff options
Diffstat (limited to 'common/storage_common.cpp')
-rw-r--r-- | common/storage_common.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/common/storage_common.cpp b/common/storage_common.cpp index 6982a4c..1f2594e 100644 --- a/common/storage_common.cpp +++ b/common/storage_common.cpp | |||
@@ -24,6 +24,8 @@ | |||
24 | #include "log.h" | 24 | #include "log.h" |
25 | #include <QUuid> | 25 | #include <QUuid> |
26 | 26 | ||
27 | SINK_DEBUG_AREA("storage") | ||
28 | |||
27 | namespace Sink { | 29 | namespace Sink { |
28 | 30 | ||
29 | static const char *s_internalPrefix = "__internal"; | 31 | static const char *s_internalPrefix = "__internal"; |
@@ -31,7 +33,7 @@ static const int s_internalPrefixSize = strlen(s_internalPrefix); | |||
31 | 33 | ||
32 | void errorHandler(const Storage::Error &error) | 34 | void errorHandler(const Storage::Error &error) |
33 | { | 35 | { |
34 | Warning() << "Database error in " << error.store << ", code " << error.code << ", message: " << error.message; | 36 | SinkWarning() << "Database error in " << error.store << ", code " << error.code << ", message: " << error.message; |
35 | } | 37 | } |
36 | 38 | ||
37 | std::function<void(const Storage::Error &error)> Storage::basicErrorHandler() | 39 | std::function<void(const Storage::Error &error)> Storage::basicErrorHandler() |
@@ -67,7 +69,7 @@ qint64 Storage::maxRevision(const Sink::Storage::Transaction &transaction) | |||
67 | }, | 69 | }, |
68 | [](const Error &error) { | 70 | [](const Error &error) { |
69 | if (error.code != Sink::Storage::NotFound) { | 71 | if (error.code != Sink::Storage::NotFound) { |
70 | Warning() << "Coultn'd find the maximum revision."; | 72 | SinkWarning() << "Coultn'd find the maximum revision."; |
71 | } | 73 | } |
72 | }); | 74 | }); |
73 | return r; | 75 | return r; |
@@ -88,7 +90,7 @@ qint64 Storage::cleanedUpRevision(const Sink::Storage::Transaction &transaction) | |||
88 | }, | 90 | }, |
89 | [](const Error &error) { | 91 | [](const Error &error) { |
90 | if (error.code != Sink::Storage::NotFound) { | 92 | if (error.code != Sink::Storage::NotFound) { |
91 | Warning() << "Coultn'd find the maximum revision."; | 93 | SinkWarning() << "Coultn'd find the maximum revision."; |
92 | } | 94 | } |
93 | }); | 95 | }); |
94 | return r; | 96 | return r; |
@@ -103,7 +105,7 @@ QByteArray Storage::getUidFromRevision(const Sink::Storage::Transaction &transac | |||
103 | uid = value; | 105 | uid = value; |
104 | return false; | 106 | return false; |
105 | }, | 107 | }, |
106 | [revision](const Error &error) { Warning() << "Coultn'd find uid for revision: " << revision << error.message; }); | 108 | [revision](const Error &error) { SinkWarning() << "Coultn'd find uid for revision: " << revision << error.message; }); |
107 | return uid; | 109 | return uid; |
108 | } | 110 | } |
109 | 111 | ||
@@ -116,7 +118,7 @@ QByteArray Storage::getTypeFromRevision(const Sink::Storage::Transaction &transa | |||
116 | type = value; | 118 | type = value; |
117 | return false; | 119 | return false; |
118 | }, | 120 | }, |
119 | [revision](const Error &error) { Warning() << "Coultn'd find type for revision " << revision; }); | 121 | [revision](const Error &error) { SinkWarning() << "Coultn'd find type for revision " << revision; }); |
120 | return type; | 122 | return type; |
121 | } | 123 | } |
122 | 124 | ||