Replies: 1 comment
-
Did you find a solution for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I create tracing events with a boolean marker field like
I then implement
tracing_subscriber::fmt::FormatEvent
for my custom event formatter, something like:The problem is that when I display the event with
ctx.format_fields(writer.by_ref(), event)?;
at the bottom, it also prints thehas_emoji = true
part, which i'd like to skip.I scoured the docs, and found https://docs.rs/tracing-subscriber/0.3.18/tracing_subscriber/field/index.html but none of the utilities there allows skipping a field.
How could I got about implementing this, while keeping the default formatting?
Is copying and adapting the whole of
https://docs.rs/tracing-subscriber/0.3.18/tracing_subscriber/fmt/format/struct.DefaultFields.html
and
https://docs.rs/tracing-subscriber/0.3.18/tracing_subscriber/fmt/format/struct.DefaultVisitor.html
the only way of doing this?
Or perhaps there's a different better way?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions