-
Notifications
You must be signed in to change notification settings - Fork 832
Closed
Description
Bug Report
Version
tracing v0.1.40
tracing-subscriber v0.3.18
Platform
Linux 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Crates
tracing-subscriber
Description
The tracing-subscriber
0.3.18 docs claim that SubscriberBuilder::with_ansi()
can be used even when the ansi
feature is disabled. And indeed this is true on master. But in the released 0.3.18 code this is not true: commit 049ad73 did not remove the #[cfg(feature = "ansi")]
from the method.
The 0.3.18 version of the code is here:
tracing/tracing-subscriber/src/fmt/mod.rs
Lines 623 to 637 in 8b7a1dd
/// This method itself is still available without the feature flag. This | |
/// is to allow ANSI escape codes to be explicitly *disabled* without | |
/// having to opt-in to the dependencies required to emit ANSI formatting. | |
/// This way, code which constructs a formatter that should never emit | |
/// ANSI escape codes can ensure that they are not used, regardless of | |
/// whether or not other crates in the dependency graph enable the "ansi" | |
/// feature flag. | |
#[cfg(feature = "ansi")] | |
#[cfg_attr(docsrs, doc(cfg(feature = "ansi")))] | |
pub fn with_ansi(self, ansi: bool) -> SubscriberBuilder<N, format::Format<L, T>, F, W> { | |
SubscriberBuilder { | |
inner: self.inner.with_ansi(ansi), | |
..self | |
} | |
} |
Metadata
Metadata
Assignees
Labels
No labels