summaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index 33b370c..7fe1559 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2139,6 +2139,8 @@ setup(void)
for (i = 0; i < LENGTH(sig); i++)
sigaction(sig[i], &sa, NULL);
+ wlr_log_init(log_level, NULL);
+
/* The Wayland display is managed by libwayland. It handles accepting
* clients from the Unix socket, manging Wayland globals, and so on. */
dpy = wl_display_create();
@@ -2797,9 +2799,11 @@ main(int argc, char *argv[])
char *startup_cmd = NULL;
int c;
- while ((c = getopt(argc, argv, "s:hv")) != -1) {
+ while ((c = getopt(argc, argv, "s:hdv")) != -1) {
if (c == 's')
startup_cmd = optarg;
+ else if (c == 'd')
+ log_level = WLR_DEBUG;
else if (c == 'v')
die("dwl " VERSION);
else
@@ -2817,5 +2821,5 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
usage:
- die("Usage: %s [-v] [-s startup command]", argv[0]);
+ die("Usage: %s [-v] [-d] [-s startup command]", argv[0]);
}