From aa2ae883afd263c10043ddf98d9c4b1f528a4920 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 10 Sep 2023 02:22:34 +0200 Subject: [PATCH] remove bad filter --- src/logger/mod.rs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/logger/mod.rs b/src/logger/mod.rs index 54b9319..09ac4b9 100644 --- a/src/logger/mod.rs +++ b/src/logger/mod.rs @@ -108,17 +108,19 @@ impl Logger { return Err(Error::Usage(format!("logging is already initialized"))); } 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 + // 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 + // filter |= metadata.level() > &Level::DEBUG; + // + // filter + // FIXME: Make the filter customizable with sane defaults. Don't block the + // executing crate. + true }); let basic_subscriber = tracing_subscriber::fmt::Subscriber::builder()