How to remove span name in log message? #2424
Answered
by
elkowar
notinmybackyaard
asked this question in
Q&A
-
Hello!
Expected Log: Actual Log: |
Beta Was this translation helpful? Give feedback.
Answered by
elkowar
Dec 17, 2024
Replies: 1 comment
-
You can use a filter on your fmt-layer, for example a filter_fn which filters out span events for that layer. I.e.: tracing_subscriber::registry()
.with(format_layer.with_filter(filter::filter_fn(move |meta| {
!meta.is_span() || include_span_info
})))
.with(env_filter)
.init(); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
notinmybackyaard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use a filter on your fmt-layer, for example a filter_fn which filters out span events for that layer.
I.e.: