This commit is contained in:
Dominique Martinet 2018-01-05 14:41:10 +00:00 committed by GitHub
commit ffde7950d3

View file

@ -16,6 +16,7 @@
#include <sys/prctl.h> #include <sys/prctl.h>
#endif #endif
#include <wlr/util/log.h> #include <wlr/util/log.h>
void init_log(log_importance_t verbosity); // log.h, but can't include because of conflict
#include "sway/config.h" #include "sway/config.h"
#include "sway/server.h" #include "sway/server.h"
#include "sway/layout.h" #include "sway/layout.h"
@ -331,10 +332,13 @@ int main(int argc, char **argv) {
// TODO: switch logging over to wlroots? // TODO: switch logging over to wlroots?
if (debug) { if (debug) {
wlr_log_init(L_DEBUG, NULL); wlr_log_init(L_DEBUG, NULL);
init_log(L_DEBUG);
} else if (verbose || validate) { } else if (verbose || validate) {
wlr_log_init(L_INFO, NULL); wlr_log_init(L_INFO, NULL);
init_log(L_INFO);
} else { } else {
wlr_log_init(L_ERROR, NULL); wlr_log_init(L_ERROR, NULL);
init_log(L_ERROR);
} }
if (optind < argc) { // Behave as IPC client if (optind < argc) { // Behave as IPC client