aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sway/main.c b/sway/main.c
index b9549b12..3d2d6c68 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -288,6 +288,15 @@ int main(int argc, char **argv) {
288 } 288 }
289 } 289 }
290 290
291 // we need to setup logging before wlc_init in case it fails.
292 if (debug) {
293 init_log(L_DEBUG);
294 } else if (verbose || validate) {
295 init_log(L_INFO);
296 } else {
297 init_log(L_ERROR);
298 }
299
291 if (optind < argc) { // Behave as IPC client 300 if (optind < argc) { // Behave as IPC client
292 if(optind != 1) { 301 if(optind != 1) {
293 sway_log(L_ERROR, "Don't use options with the IPC client"); 302 sway_log(L_ERROR, "Don't use options with the IPC client");
@@ -329,14 +338,6 @@ int main(int argc, char **argv) {
329 } 338 }
330#endif 339#endif
331 340
332 // we need to setup logging before wlc_init in case it fails.
333 if (debug) {
334 init_log(L_DEBUG);
335 } else if (verbose || validate) {
336 init_log(L_INFO);
337 } else {
338 init_log(L_ERROR);
339 }
340 wlc_log_set_handler(wlc_log_handler); 341 wlc_log_set_handler(wlc_log_handler);
341 log_kernel(); 342 log_kernel();
342 log_distro(); 343 log_distro();