generated from PlexSheep/baserepo
added some functionality to the loggers filter
This commit is contained in:
commit
223a5ad508
|
@ -28,6 +28,7 @@ pub mod args;
|
|||
use args::*;
|
||||
|
||||
//// CONSTANTS /////////////////////////////////////////////////////////////////////////////////////
|
||||
#[allow(dead_code)]
|
||||
const EXIT_SUCCESS: i32 = 0;
|
||||
const EXIT_FAILURE_USAGE: i32 = 1;
|
||||
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
||||
|
|
Reference in New Issue