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", "parking_lot", "chrono"] }
default = ansi, fmt, smallvec, std, tracing-log

These default features are set whenever tracing-subscriber is added without default-features = false somewhere in the dependency tree.

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's macros 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. These features may have been created by mistake, and this functionality may be removed in the future.

tracing env-filter?

Enables tracing

only required by the filter feature

matchers env-filter?

Enables matchers ^0.1.0

regex env-filter?
smallvec default
once_cell env-filter?
tracing-log default

Enables tracing-log

fmt

nu-ansi-term ansi

Enables nu-ansi-term ^0.46.0

time local-time?
serde_json json?

Enables serde_json

only required by the json feature

serde json?
tracing-serde json? valuable?
parking_lot implicit feature

Enables parking_lot

opt-in deps

chrono implicit feature

Enables chrono

chrono:

Date and time library for Rust

sharded-slab registry?

Enables sharded-slab

registry

thread_local env-filter? registry?
valuable-serde tracing_unstable valuable?
valuable_crate tracing_unstable valuable?

Enables valuable