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

@ -2,7 +2,7 @@ use {
crate::{
async_engine::{AsyncEngine, SpawnedFuture},
client::{EventFormatter, RequestParser},
compositor::WAYLAND_DISPLAY,
compositor::{LogLevel, WAYLAND_DISPLAY},
io_uring::{IoUring, IoUringError},
logger::Logger,
object::{ObjectId, WL_DISPLAY_ID},
@ -30,7 +30,6 @@ use {
},
},
ahash::AHashMap,
log::Level,
std::{
cell::{Cell, RefCell},
collections::VecDeque,
@ -97,7 +96,7 @@ pub struct ToolClient {
jay_damage_tracking: Cell<Option<Option<JayDamageTrackingId>>>,
}
pub fn with_tool_client<T, F>(level: Level, f: F)
pub fn with_tool_client<T, F>(level: LogLevel, f: F)
where
F: FnOnce(Rc<ToolClient>) -> T + 'static,
T: Future<Output = ()> + 'static,
@ -111,7 +110,7 @@ fn handle_error(e: ToolClientError) -> ! {
fatal!("Could not create a tool client: {}", ErrorFmt(e));
}
fn with_tool_client_<T, F>(level: Level, f: F) -> Result<(), ToolClientError>
fn with_tool_client_<T, F>(level: LogLevel, f: F) -> Result<(), ToolClientError>
where
F: FnOnce(Rc<ToolClient>) -> T + 'static,
T: Future<Output = ()> + 'static,