avoid duplicating the RUSTC_LOG env var name

This commit is contained in:
Ralf Jung 2023-02-09 11:18:21 +01:00
parent c40919b7a7
commit 569c2fe54b

View File

@ -53,12 +53,6 @@ use tracing_subscriber::fmt::{
};
use tracing_subscriber::layer::SubscriberExt;
pub fn init_rustc_env_logger() -> Result<(), Error> {
init_env_logger("RUSTC_LOG")
}
/// In contrast to `init_rustc_env_logger` this allows you to choose an env var
/// other than `RUSTC_LOG`.
pub fn init_env_logger(env: &str) -> Result<(), Error> {
let filter = match env::var(env) {
Ok(env) => EnvFilter::new(env),