Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tracing-subscriber: correct fmt::init() documentation #2224

Merged
merged 3 commits into from Jul 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions tracing-subscriber/src/fmt/mod.rs
Expand Up @@ -1203,13 +1203,19 @@ pub fn try_init() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
/// Install a global tracing subscriber that listens for events and
/// filters based on the value of the [`RUST_LOG` environment variable].
///
/// The configuration of the subscriber initialized by this function
/// depends on what [feature flags](crate#feature-flags) are enabled.
///
/// If the `tracing-log` feature is enabled, this will also install
hawkw marked this conversation as resolved.
Show resolved Hide resolved
/// the LogTracer to convert `Log` records into `tracing` `Event`s.
///
/// This is shorthand for
/// If the `env-filter` feature is enabled, this is shorthand for
hawkw marked this conversation as resolved.
Show resolved Hide resolved
///
/// ```rust
/// tracing_subscriber::fmt().init()
/// # use tracing_subscriber::EnvFilter;
/// tracing_subscriber::fmt()
/// .with_env_filter(EnvFilter::from_default_env())
/// .init();
/// ```
///
/// # Panics
Expand Down