Skip to content

Commit

Permalink
use logs to debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldsteinE committed Aug 23, 2023
1 parent 5539f37 commit 0037e7a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions elfo-logger/src/filtering_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ impl<S: Subscriber> Layer<S> for FilteringLayer {
if std::ptr::eq(log_name, name) {
let config = self.inner.config.load();
if !config.targets.would_enable(meta.target(), meta.level()) {
tracing::error!(
"WTF filtered log from {} on {}",
meta.target(),
meta.level(),
);
return false;
}
}
Expand All @@ -97,6 +102,11 @@ impl<S: Subscriber> Layer<S> for FilteringLayer {
self.inner.log_metadata_name.set(name).ok();
let config = self.inner.config.load();
if !config.targets.would_enable(meta.target(), meta.level()) {
tracing::error!(
"WTF filtered log from {} on {}",
meta.target(),
meta.level(),
);
return false;
}
}
Expand Down

0 comments on commit 0037e7a

Please sign in to comment.