code: Set wlroots loglevel based on -l flag

This commit is contained in:
Marten Ringwelski 2020-11-19 19:51:14 +01:00 committed by Isaac Freund
parent cbd4a2807b
commit 7d0014cd38

View file

@ -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", .{}); log.info(.server, "initializing", .{});