Cargo Features
[dependencies]
tracing-subscriber = { version = "0.3.18", default-features = false, features = ["std", "alloc", "env-filter", "fmt", "ansi", "registry", "json", "valuable", "local-time", "smallvec", "tracing-log", "time", "parking_lot", "chrono"] }
- default = ansi, fmt, smallvec, std, tracing-log
-
These default features are set whenever
tracing-subscriber
is added without
somewhere in the dependency tree.default-features = false - std default env-filter? fmt registry? = alloc
-
Enables std of tracing-core
Affects
registry::SpanData.extensions
,registry::SpanData.extensions_mut
,util::SubscriberInitExt.set_default
,layer::Layer.with_filter
,layer::Layer.boxed
… - alloc std
-
Affects
layer::Layer.boxed
… - env-filter = matchers, once_cell, regex, std, thread_local, tracing
- fmt default ansi = registry, std
- ansi default = fmt, nu-ansi-term
- registry fmt = sharded-slab, std, thread_local
-
Affects
layer_filters::FilterId
,registry::LookupSpan.register_filter
,registry::SpanData.is_enabled_for
,sharded::Registry
,sharded::Data
,layer::Layer.with_filter
… - json = serde, serde_json, tracing-serde
-
Affects
format::json
… - valuable = valuable-serde, valuable_crate
-
Enables valuable of tracing-core and tracing-serde
- local-time
-
Enables support for local time when using the
time
crate timestamp formatters.Enables local-offset of time
Enable the
time
crate'smacros
feature, for examples.Affects
time_crate::LocalTime
…
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features.
- tracing env-filter?
-
- matchers env-filter?
- regex env-filter?
-
With std, unicode-case and unicode-perl
- smallvec default
- once_cell env-filter?
- tracing-log default
-
With log-tracer and std
- nu-ansi-term ansi
-
Enables nu-ansi-term ^0.46.0
- time implicit feature
-
With formatting and default (std)
- serde_json json?
- serde json?
- tracing-serde json?
- parking_lot implicit feature
-
- chrono implicit feature
- sharded-slab registry?
-
- thread_local env-filter? registry?
- valuable-serde cfg(tracing_unstable) valuable?
- valuable_crate cfg(tracing_unstable) valuable?
-
Enables valuable