diff options
Diffstat (limited to 'synchronizer/main.cpp')
-rw-r--r-- | synchronizer/main.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp index b3decf6..e9dd6cb 100644 --- a/synchronizer/main.cpp +++ b/synchronizer/main.cpp | |||
@@ -34,8 +34,7 @@ | |||
34 | #include "log.h" | 34 | #include "log.h" |
35 | #include "test.h" | 35 | #include "test.h" |
36 | 36 | ||
37 | #undef DEBUG_AREA | 37 | SINK_DEBUG_AREA("main") |
38 | #define DEBUG_AREA "resource" | ||
39 | 38 | ||
40 | static Listener *listener = nullptr; | 39 | static Listener *listener = nullptr; |
41 | 40 | ||
@@ -149,13 +148,13 @@ int main(int argc, char *argv[]) | |||
149 | arguments << argv[i]; | 148 | arguments << argv[i]; |
150 | } | 149 | } |
151 | if (arguments.contains("--test")) { | 150 | if (arguments.contains("--test")) { |
152 | Log() << "Running in test-mode"; | 151 | SinkLog() << "Running in test-mode"; |
153 | arguments.removeAll("--test"); | 152 | arguments.removeAll("--test"); |
154 | Sink::Test::setTestModeEnabled(true); | 153 | Sink::Test::setTestModeEnabled(true); |
155 | } | 154 | } |
156 | 155 | ||
157 | if (arguments.count() < 3) { | 156 | if (arguments.count() < 3) { |
158 | Warning() << "Not enough args passed, no resource loaded."; | 157 | SinkWarning() << "Not enough args passed, no resource loaded."; |
159 | return app.exec(); | 158 | return app.exec(); |
160 | } | 159 | } |
161 | 160 | ||
@@ -163,12 +162,12 @@ int main(int argc, char *argv[]) | |||
163 | const QByteArray resourceType = arguments.at(2); | 162 | const QByteArray resourceType = arguments.at(2); |
164 | app.setApplicationName(instanceIdentifier); | 163 | app.setApplicationName(instanceIdentifier); |
165 | Sink::Log::setPrimaryComponent(instanceIdentifier); | 164 | Sink::Log::setPrimaryComponent(instanceIdentifier); |
166 | Log() << "Starting: " << instanceIdentifier; | 165 | SinkLog() << "Starting: " << instanceIdentifier; |
167 | 166 | ||
168 | QLockFile lockfile(instanceIdentifier + ".lock"); | 167 | QLockFile lockfile(instanceIdentifier + ".lock"); |
169 | lockfile.setStaleLockTime(500); | 168 | lockfile.setStaleLockTime(500); |
170 | if (!lockfile.tryLock(0)) { | 169 | if (!lockfile.tryLock(0)) { |
171 | Warning() << "Failed to acquire exclusive lock on socket."; | 170 | SinkWarning() << "Failed to acquire exclusive lock on socket."; |
172 | return -1; | 171 | return -1; |
173 | } | 172 | } |
174 | 173 | ||
@@ -178,6 +177,6 @@ int main(int argc, char *argv[]) | |||
178 | QObject::connect(listener, &Listener::noClients, &app, &QCoreApplication::quit); | 177 | QObject::connect(listener, &Listener::noClients, &app, &QCoreApplication::quit); |
179 | 178 | ||
180 | auto ret = app.exec(); | 179 | auto ret = app.exec(); |
181 | Log() << "Exiting: " << instanceIdentifier; | 180 | SinkLog() << "Exiting: " << instanceIdentifier; |
182 | return ret; | 181 | return ret; |
183 | } | 182 | } |