Cargo Features

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 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


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.

tracing env-filter?

matchers env-filter?
regex env-filter?

With std, unicode-case and unicode-perl

smallvec default
once_cell env-filter?

With default (std)

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?

With default (std)

serde json?

With default (std)

tracing-serde json?
parking_lot implicit feature

chrono implicit feature

With clock and std

sharded-slab registry?

thread_local env-filter? registry?
valuable-serde cfg(tracing_unstable) valuable?
valuable_crate cfg(tracing_unstable) valuable?

Enables valuable