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
813 stars 126 forks source link

fix: `Target::Pipe` respects `WriteStyle` #275

Closed miraclx closed 8 months ago

miraclx commented 1 year ago

Resolves https://github.com/rust-cli/env_logger/issues/274.

The old behavior made it impossible to retain colors in custom sinks.

With this patch, the default behavior assumes non-color compliance with the sink. But this can be overridden with WriteStyle::Always.

matthiasbeyer commented 1 year ago

What exactly does this PR change? I only see renamed variables, a cast that I don't think is necessary and some if {} else {} changed to then_some()?

epage commented 8 months ago

This is superseded by #298