Skip to content

Commit

Permalink
Hopefully fix log filter issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
ISibboI committed Aug 28, 2023
1 parent f4102eb commit 053826b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions backend/rvoc-backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ fn setup_tracing_subscriber(configuration: &Configuration) -> RVocResult<()> {
.json()
.with_span_list(true)
.with_filter(FilterFn::new(|metadata| {
!(metadata.target().starts_with("tokio_util::") && metadata.level() <= &Level::TRACE
|| metadata.target().starts_with("hyper::") && metadata.level() <= &Level::DEBUG)
if metadata.target().starts_with("tokio_util::") {
metadata.level() > &Level::TRACE
} else if metadata.target().starts_with("hyper::") {
metadata.level() > &Level::DEBUG
} else {
true
}
}));
let subscriber = Registry::default().with(logging_layer);

Expand Down

0 comments on commit 053826b

Please sign in to comment.