From 7d0014cd389d550040695dfff6dfc5196c482feb Mon Sep 17 00:00:00 2001 From: Marten Ringwelski Date: Thu, 19 Nov 2020 19:51:14 +0100 Subject: [PATCH] code: Set wlroots loglevel based on -l flag --- river/main.zig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/river/main.zig b/river/main.zig index 2018690..b82b152 100644 --- a/river/main.zig +++ b/river/main.zig @@ -93,7 +93,14 @@ pub fn main() anyerror!void { } } - c.wlr_log_init(.WLR_ERROR, null); + c.wlr_log_init( + switch (log.level) { + .debug => .WLR_DEBUG, + .notice, .info, => .WLR_INFO, + .warn, .err, .crit, .alert, .emerg => .WLR_ERROR, + }, + null, + ); log.info(.server, "initializing", .{});