rust-cli / env_logger

A logging implementation for `log` which is configured via an environment variable.
https://docs.rs/env_logger
Apache License 2.0
782 stars 124 forks source link

fix(fmt): Fix passing of WriteStyle when using Target::Pipe #302

Closed Bobo1239 closed 5 months ago

Bobo1239 commented 5 months ago

Seems like this was overlooked in #298.

Test program:

fn main() {
    env_logger::builder()
        .target(env_logger::Target::Pipe(Box::new(std::io::stdout())))
        .write_style(env_logger::WriteStyle::Always)
        .init();
    log::error!("ASD");
}

Fixes #274.

epage commented 5 months ago

Thanks for that and sorry I missed that!