mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
avoid duplicating the RUSTC_LOG env var name
This commit is contained in:
parent
c40919b7a7
commit
569c2fe54b
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user