what a plan! what an impl! this is ahh

This commit is contained in:
lda committed 2026-04-11 15:25:18 +07:00
1 parent a36e9d058d
commit e2feaeab8c
43 files changed
+1090 -1629

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
use tracing_subscriber::{EnvFilter, fmt, layer::SubscriberExt, util::SubscriberInitExt};
pub fn init(verbose: u8) {
let filter = EnvFilter::try_from_default_env()
.or_else(|_| EnvFilter::try_new(default_filter(verbose)))
.expect("static tracing filter should parse");
tracing_subscriber::registry()
.with(filter)
.with(fmt::layer())
.init();
}
fn default_filter(verbose: u8) -> &'static str {
match verbose {
0 => "wakey_control_plane=info",
1 => "wakey_control_plane=debug",
_ => "wakey_control_plane=trace",
}
}