diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index 0b3da12788..dcea8dcb82 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -26,10 +26,10 @@ keywords = ["logging", "tracing", "metrics", "subscriber"] default = ["smallvec", "fmt", "ansi", "tracing-log", "std"] alloc = [] std = ["alloc", "tracing-core/std"] -env-filter = ["matchers", "regex", "lazy_static", "tracing"] -fmt = ["registry"] +env-filter = ["matchers", "regex", "lazy_static", "tracing", "std"] +fmt = ["registry", "std"] ansi = ["fmt", "ansi_term"] -registry = ["sharded-slab", "thread_local"] +registry = ["sharded-slab", "thread_local", "std"] json = ["tracing-serde", "serde", "serde_json"] # Enables support for local time when using the `time` crate timestamp # formatters. diff --git a/tracing-subscriber/src/lib.rs b/tracing-subscriber/src/lib.rs index 730fc05f36..209045283e 100644 --- a/tracing-subscriber/src/lib.rs +++ b/tracing-subscriber/src/lib.rs @@ -50,15 +50,16 @@ //! (enabled by default). //! - `alloc`: Depend on [`liballoc`] (enabled by "std"). //! - `env-filter`: Enables the [`EnvFilter`] type, which implements filtering -//! similar to the [`env_logger` crate]. +//! similar to the [`env_logger` crate]. **Requires "std"**. //! - `fmt`: Enables the [`fmt`] module, which provides a subscriber //! implementation for printing formatted representations of trace events. -//! Enabled by default. +//! Enabled by default. **Requires "std"**. //! - `ansi`: Enables `fmt` support for ANSI terminal colors. Enabled by //! default. //! - `registry`: enables the [`registry`] module. Enabled by default. +//! **Requires "std"**. //! - `json`: Enables `fmt` support for JSON output. In JSON output, the ANSI -//! feature does nothing. +//! feature does nothing. **Requires "fmt" and "std"**. //! - [`local-time`]: Enables local time formatting when using the [`time` //! crate]'s timestamp formatters with the `fmt` subscriber. //!