1
0
Fork 0
forked from wry/wry

compositor: add LogLevel enum

This commit is contained in:
Julian Orth 2026-03-07 11:40:45 +01:00
parent be0782f5d2
commit 042070ee99
26 changed files with 131 additions and 106 deletions

View file

@ -4,11 +4,12 @@ use {
tools::tool_client::{ToolClient, with_tool_client},
wire::jay_compositor::SetLogLevel,
},
linearize::Linearize,
std::rc::Rc,
};
pub fn main(global: GlobalArgs, args: SetLogArgs) {
with_tool_client(global.log_level.into(), |tc| async move {
with_tool_client(global.log_level, |tc| async move {
let logger = Rc::new(Log {
tc: tc.clone(),
args,
@ -27,7 +28,7 @@ async fn run(log: Rc<Log>) {
let comp = tc.jay_compositor().await;
tc.send(SetLogLevel {
self_id: comp,
level: log.args.level as u32,
level: log.args.level.linearize() as u32,
});
tc.round_trip().await;
}