From 6f31706a184ebe6332c1a4d083702a06b56cfb87 Mon Sep 17 00:00:00 2001 From: Boris-Chengbiao Zhou Date: Sat, 27 Jan 2024 03:37:56 +0100 Subject: [PATCH 1/3] fix(fmt): Fix passing of WriteStyle when using Target::Pipe --- src/fmt/writer/buffer.rs | 7 +++++-- src/fmt/writer/mod.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/fmt/writer/buffer.rs b/src/fmt/writer/buffer.rs index a7ea25b..b720a98 100644 --- a/src/fmt/writer/buffer.rs +++ b/src/fmt/writer/buffer.rs @@ -31,10 +31,13 @@ impl BufferWriter { } } - pub(in crate::fmt::writer) fn pipe(pipe: Box>) -> Self { + pub(in crate::fmt::writer) fn pipe( + pipe: Box>, + write_style: WriteStyle, + ) -> Self { BufferWriter { target: WritableTarget::Pipe(pipe), - write_style: WriteStyle::Never, + write_style, } } diff --git a/src/fmt/writer/mod.rs b/src/fmt/writer/mod.rs index dbcf45b..688fda1 100644 --- a/src/fmt/writer/mod.rs +++ b/src/fmt/writer/mod.rs @@ -138,7 +138,7 @@ impl Builder { let writer = match mem::take(&mut self.target) { Target::Stdout => BufferWriter::stdout(self.is_test, color_choice), Target::Stderr => BufferWriter::stderr(self.is_test, color_choice), - Target::Pipe(pipe) => BufferWriter::pipe(Box::new(Mutex::new(pipe))), + Target::Pipe(pipe) => BufferWriter::pipe(Box::new(Mutex::new(pipe)), color_choice), }; Writer { inner: writer } From 9f73bde4ba4d14085e0248af8eef87b506290443 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Jan 2024 21:47:10 -0600 Subject: [PATCH 2/3] docs: Update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3f20a2..ecc28da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +### Fixes + +- Allow styling with `Target::Pipe` + ## [0.11.0] - 2024-01-19 ### Breaking Change @@ -31,7 +35,6 @@ MSRV changed to 1.71 ### Fixes - Print colors when `is_test(true)` -- Allow styling with `Target::Pipe` ## [0.10.2] - 2024-01-18 From 7113ad4bd937a56b260a799f8952f3e61d0eaea7 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Jan 2024 21:47:15 -0600 Subject: [PATCH 3/3] chore: Release --- CHANGELOG.md | 5 ++++- Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc28da..c6b4ef7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +## [0.11.1] - 2024-01-27 + ### Fixes - Allow styling with `Target::Pipe` @@ -90,7 +92,8 @@ To open room for changing dependencies: - Added a method to print the module instead of the target -[Unreleased]: https://github.com/rust-cli/env_logger/compare/v0.11.0...HEAD +[Unreleased]: https://github.com/rust-cli/env_logger/compare/v0.11.1...HEAD +[0.11.1]: https://github.com/rust-cli/env_logger/compare/v0.11.0...v0.11.1 [0.11.0]: https://github.com/rust-cli/env_logger/compare/v0.10.2...v0.11.0 [0.10.2]: https://github.com/rust-cli/env_logger/compare/v0.10.1...v0.10.2 [0.10.1]: https://github.com/rust-cli/env_logger/compare/v0.10.0...v0.10.1 diff --git a/Cargo.lock b/Cargo.lock index 204d2c4..bb0de81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,7 +81,7 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.0" +version = "0.11.1" dependencies = [ "anstream", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 224c665..97ffdd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ include = [ [package] name = "env_logger" -version = "0.11.0" +version = "0.11.1" description = """ A logging implementation for `log` which is configured via an environment variable. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy