For logging purposes, I would like to print the RUST_LOG and possibly RUST_LOG_STYLE values as ingested by the env_logger. Is there a way to serialize internal state of the env_logger::Builder as a RUST_LOG-like string?
I could of course just read the RUST_LOG env var, and do a default fallback, but it seems this won't be as clean as having the builder format its own state?
For logging purposes, I would like to print the
RUST_LOG
and possiblyRUST_LOG_STYLE
values as ingested by the env_logger. Is there a way to serialize internal state of theenv_logger::Builder
as aRUST_LOG
-like string?I could of course just read the
RUST_LOG
env var, and do a default fallback, but it seems this won't be as clean as having the builder format its own state?