You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Guys, I found this repository linked on a similar issue on EnvFilter (tokio-rs/tracing#1181), so I thought I'd give it a try.
I am trying to do log filtering based off a field=value, but I cannot get any logs to match when value is present. I'll put a few examples below to show:
let filter = Filter::parse(FILTER_STRING);println!("{:?}", &filter);
registry
.with(
fmt::Layer::new().with_filter(filter),).try_init().expect("Failed to set subscriber");// More code here ...// Note that data.id() is not a string, but it has a plain string debug representation
tracing::trace!(device_id=?data.id(), "Test trace");// More code here ...
Hi Guys, I found this repository linked on a similar issue on
EnvFilter
(tokio-rs/tracing#1181), so I thought I'd give it a try.I am trying to do log filtering based off a
field=value
, but I cannot get any logs to match when value is present. I'll put a few examples below to show:FILTER_STRING = info,[{device_id}]
Filter debug representation
FILTER_STRING = info,[{device_id=.*}]
Filter debug representation
FILTER_STRING = info,[{device_id=ac233fa8c59b}]
Filter debug representation
The text was updated successfully, but these errors were encountered: