-
Notifications
You must be signed in to change notification settings - Fork 761
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: added explicit with_timestamp
method for any impls that use without_time
#2084
Conversation
tracing-subscriber/src/fmt/mod.rs
Outdated
/// Do not emit timestamps with log messages. | ||
pub fn without_time(self) -> CollectorBuilder<N, format::Format<L, ()>, F, W> { | ||
pub fn without_time(self) -> CollectorBuilder<N, format::Format<L, T>, F, W> { |
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.
should without_time
be marked with a deprecated flag?
Do we want to maintain tracing/tracing-subscriber/src/fmt/time/mod.rs Lines 81 to 85 in 55fdc75
|
The implementation for |
I ran into this recently (no The other, related thing, I ran into is not being able to toggle What if there was a |
Motivation
.without_time()
is inconsistent and lacks the ergonimics of currentBuilder::with_flag
methods.Example of how timestamps are currently toggled:
Solution
tracing_subscriber::fmt::Layer::with_timestamp(self, display_timestamp: bool)
Option
:without_time()
methods to maintain backwards compatibility