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: link init docs in description of tracing-log feature flag #3107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaskij
Copy link

@jaskij jaskij commented Oct 15, 2024

Motivation

When updating my project after a time of inactivity, I reviewed feature flags of tracing_subscriber, and decided to enable the tracing-log feature. This, inevitably lead to a panic in my wrapper, which has function like so:

pub fn init_short_logs(filter: impl Into<EnvFilter>) {
    tracing_subscriber::fmt()
        .with_env_filter(filter)
        .with_span_events(FmtSpan::CLOSE)
        .with_writer(std::io::stdout)
        .compact()
        .init();
}

Solution

To reduce future confusion, this PR adds a link to tracing_subscriber::util::SubscriberInitExt in the description of the feature flag.

@jaskij jaskij requested review from hawkw, davidbarsky and a team as code owners October 15, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant