rust-lang / log

Logging implementation for Rust
https://docs.rs/log
Apache License 2.0
2.18k stars 253 forks source link

Change environment variable name. #83

Closed quadrupleslap closed 6 years ago

quadrupleslap commented 8 years ago

For env_logger, maybe keep the default as RUST_LOG and allow the users to change it as a config option? For example, I might want people to use MC_LOG to change the log level of my Minecraft clone.

xetra11 commented 8 years ago

Yea that would be nice! Because I want people who use my library use a library specific env variable to active the logging like "RR_LOG"

dtolnay commented 7 years ago

The workaround for now is:

let mut lb = env_logger::LogBuilder::new();
if let Ok(log_config) = env::var("MC_LOG") {
    lb.parse(&log_config);
}
lb.init()
sfackler commented 6 years ago

env_logger has moved out of tree.