diff --git a/src/bin/main/mod.rs b/src/bin/main/mod.rs index 8aea29b..c9ee8cc 100644 --- a/src/bin/main/mod.rs +++ b/src/bin/main/mod.rs @@ -28,6 +28,7 @@ pub mod args; use args::*; //// CONSTANTS ///////////////////////////////////////////////////////////////////////////////////// +#[allow(dead_code)] const EXIT_SUCCESS: i32 = 0; const EXIT_FAILURE_USAGE: i32 = 1; diff --git a/src/logger/mod.rs b/src/logger/mod.rs index 141bf84..54b9319 100644 --- a/src/logger/mod.rs +++ b/src/logger/mod.rs @@ -109,9 +109,15 @@ impl Logger { } else { let filter = tracing_subscriber::filter::FilterFn::new(|metadata| { let mut filter = false; + + // if it's this lib, continue filter |= metadata.target().contains(env!("CARGO_PKG_NAME")); filter |= metadata.target().contains("pt"); + // if it's another crate, only show above debug + // FIXME, this is not the behaviour I want for a real release + filter |= metadata.level() > &Level::DEBUG; + filter });