tracing icon indicating copy to clipboard operation
tracing copied to clipboard

Make method env_var_name public

Open LucDrenth opened this issue 8 months ago • 1 comments

Feature Request

I would like to make tracing-subscriber/src/filter/env/builder.rs::env_var_name a public method.

Crates

tracing-subscriber

Motivation

I would like to use the builder and check if there is an environment variable set. This requests comes from the following Bevy engine issue: https://github.com/bevyengine/bevy/pull/13897

Proposal

Make the method public.

Alternatives

I can use EnvFilter::DEFAULT_ENV since that is expoed but then I can not use the builder its env property. I can avoid using the builder as a workaround but that is not ideal since it would require me to duplicate code.

LucDrenth avatar Jun 17 '24 14:06 LucDrenth