-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subscriber: "implementing FormatEvent" docs #1727
Conversation
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
/// does not support ANSI escape codes (such as a log file), and they should | ||
/// not be emitted. | ||
/// | ||
/// Crates like [`ansi_term`] and [`owo-colors`] can be used to add ANSI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, that's a good name
//! The [`FormatFields`] trait determines how fields — both the event's | ||
//! fields and fields on spans — are formatted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the use of —
instead of —
intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can't remember the hotkey for typing a literal em dash on my keyboard...
Co-authored-by: David Barsky <[email protected]>
This branch adds some documentation to the `FormatEvent` trait in `tracing_subscriber::fmt` on how to write user-provided `FormatEvent` implementations. There's probably room for additional improvement here, but I just wanted to get something written down for now. I also fixed a broken link I noticed while I was here. Signed-off-by: Eliza Weisman <[email protected]> Co-authored-by: David Barsky <[email protected]>
This branch adds some documentation to the `FormatEvent` trait in `tracing_subscriber::fmt` on how to write user-provided `FormatEvent` implementations. There's probably room for additional improvement here, but I just wanted to get something written down for now. I also fixed a broken link I noticed while I was here. Signed-off-by: Eliza Weisman <[email protected]> Co-authored-by: David Barsky <[email protected]>
This branch adds some documentation to the `FormatEvent` trait in `tracing_subscriber::fmt` on how to write user-provided `FormatEvent` implementations. There's probably room for additional improvement here, but I just wanted to get something written down for now. I also fixed a broken link I noticed while I was here. Signed-off-by: Eliza Weisman <[email protected]> Co-authored-by: David Barsky <[email protected]>
This branch adds some documentation to the `FormatEvent` trait in `tracing_subscriber::fmt` on how to write user-provided `FormatEvent` implementations. There's probably room for additional improvement here, but I just wanted to get something written down for now. I also fixed a broken link I noticed while I was here. Signed-off-by: Eliza Weisman <[email protected]> Co-authored-by: David Barsky <[email protected]>
# 0.3.2 (Nov 19, 2021) ### Fixed - **fmt**: Fixed `MakeWriter` filtering not working with `BoxMakeWriter` ([#1694]) ### Added - **fmt**: `Writer::has_ansi_escapes` method to check if an output supports ANSI terminal formatting escape codes ([#1696]) - **fmt**: Added additional ANSI terminal formatting to field formatters when supported ([#1702]) - **fmt**: Added `FmtContext::span_scope`, `FmtContext::event_scope`, and `FmtContext::parent_span` methods for accessing the current span and its scope when formatting an event ([#1728]) - **fmt**: Improved documentation on implementing event formatters ([#1727]) [#1694]: #1694 [#1696]: #1696 [#1702]: #1702 [#1728]: #1728 [#1727]: #1727
# 0.3.2 (Nov 19, 2021) ### Fixed - **fmt**: Fixed `MakeWriter` filtering not working with `BoxMakeWriter` ([tokio-rs#1694]) ### Added - **fmt**: `Writer::has_ansi_escapes` method to check if an output supports ANSI terminal formatting escape codes ([tokio-rs#1696]) - **fmt**: Added additional ANSI terminal formatting to field formatters when supported ([tokio-rs#1702]) - **fmt**: Added `FmtContext::span_scope`, `FmtContext::event_scope`, and `FmtContext::parent_span` methods for accessing the current span and its scope when formatting an event ([tokio-rs#1728]) - **fmt**: Improved documentation on implementing event formatters ([tokio-rs#1727]) [tokio-rs#1694]: tokio-rs#1694 [tokio-rs#1696]: tokio-rs#1696 [tokio-rs#1702]: tokio-rs#1702 [tokio-rs#1728]: tokio-rs#1728 [tokio-rs#1727]: tokio-rs#1727
This branch adds some documentation to the
FormatEvent
trait intracing_subscriber::fmt
on how to write user-providedFormatEvent
implementations. There's probably room for additional improvement here,
but I just wanted to get something written down for now.
I also fixed a broken link I noticed while I was here.