mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Initialise logging earlier
This commit is contained in:
parent
ee81b1aecb
commit
f736198c31
1 changed files with 9 additions and 8 deletions
17
sway/main.c
17
sway/main.c
|
@ -288,6 +288,15 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// we need to setup logging before wlc_init in case it fails.
|
||||||
|
if (debug) {
|
||||||
|
init_log(L_DEBUG);
|
||||||
|
} else if (verbose || validate) {
|
||||||
|
init_log(L_INFO);
|
||||||
|
} else {
|
||||||
|
init_log(L_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
if (optind < argc) { // Behave as IPC client
|
if (optind < argc) { // Behave as IPC client
|
||||||
if(optind != 1) {
|
if(optind != 1) {
|
||||||
sway_log(L_ERROR, "Don't use options with the IPC client");
|
sway_log(L_ERROR, "Don't use options with the IPC client");
|
||||||
|
@ -329,14 +338,6 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// we need to setup logging before wlc_init in case it fails.
|
|
||||||
if (debug) {
|
|
||||||
init_log(L_DEBUG);
|
|
||||||
} else if (verbose || validate) {
|
|
||||||
init_log(L_INFO);
|
|
||||||
} else {
|
|
||||||
init_log(L_ERROR);
|
|
||||||
}
|
|
||||||
wlc_log_set_handler(wlc_log_handler);
|
wlc_log_set_handler(wlc_log_handler);
|
||||||
log_kernel();
|
log_kernel();
|
||||||
log_distro();
|
log_distro();
|
||||||
|
|
Loading…
Reference in a new issue