From d27278ddfc82335d249c0627c90b5d4964db6cf1 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 8 Oct 2021 21:35:25 +0200 Subject: [PATCH 01/15] Fix clippy warnings --- ci/src/task.rs | 2 +- src/fmt/humantime/extern_impl.rs | 2 +- src/fmt/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/src/task.rs b/ci/src/task.rs index 85f7ce63..5cd9a70e 100644 --- a/ci/src/task.rs +++ b/ci/src/task.rs @@ -27,7 +27,7 @@ impl TestArgs { let s = self.features.iter().fold(String::new(), |mut s, f| { if !s.is_empty() { - s.push_str(" "); + s.push(' '); } s.push_str(f); diff --git a/src/fmt/humantime/extern_impl.rs b/src/fmt/humantime/extern_impl.rs index 19dec1b6..bdf165c4 100644 --- a/src/fmt/humantime/extern_impl.rs +++ b/src/fmt/humantime/extern_impl.rs @@ -99,7 +99,7 @@ impl fmt::Debug for Timestamp { } f.debug_tuple("Timestamp") - .field(&TimestampValue(&self)) + .field(&TimestampValue(self)) .finish() } } diff --git a/src/fmt/mod.rs b/src/fmt/mod.rs index 21e09577..1677887a 100644 --- a/src/fmt/mod.rs +++ b/src/fmt/mod.rs @@ -406,7 +406,7 @@ mod tests { String::from_utf8(buf.bytes().to_vec()).expect("failed to read record") } - fn write_target<'a>(target: &'a str, fmt: DefaultFormat) -> String { + fn write_target(target: &str, fmt: DefaultFormat) -> String { write_record( Record::builder() .args(format_args!("log\nmessage")) From cb5375cc67bb03814673440433464403db401955 Mon Sep 17 00:00:00 2001 From: Alex Touchet Date: Sat, 9 Oct 2021 22:34:43 -0700 Subject: [PATCH 02/15] Update some links --- .github/workflows/docs.yml | 2 +- README.md | 6 +++--- src/fmt/writer/termcolor/extern_impl.rs | 2 +- src/lib.rs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4b6110b3..a135b860 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,7 @@ name: Continuous Integration - Docs on: push: branches: - - master + - main paths: - "**.rs" - "Cargo.toml" diff --git a/README.md b/README.md index 4e84e8f3..dd2884e9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Maintenance](https://img.shields.io/badge/maintenance-actively%20maintained-brightgreen.svg)](https://github.com/env-logger-rs/env_logger) [![crates.io](https://img.shields.io/crates/v/env_logger.svg)](https://crates.io/crates/env_logger) [![Documentation](https://docs.rs/env_logger/badge.svg)](https://docs.rs/env_logger) -[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)](https://env-logger-rs.github.io/env_logger/env_logger/index.html) +[![Documentation](https://img.shields.io/badge/docs-main-blue.svg)](https://env-logger-rs.github.io/env_logger/env_logger/index.html) ========== Implements a logger that can be configured via environment variables. @@ -12,7 +12,7 @@ Implements a logger that can be configured via environment variables. ### In libraries -`env_logger` makes sense when used in executables (binary projects). Libraries should use the [`log`](https://doc.rust-lang.org/log) crate instead. +`env_logger` makes sense when used in executables (binary projects). Libraries should use the [`log`](https://docs.rs/log) crate instead. ### In executables @@ -77,7 +77,7 @@ There is also a pseudo logging level, `off`, which may be specified to disable all logging for a given module or for the entire application. As with the logging levels, the letter case is not significant. -`env_logger` can be configured in other ways besides an environment variable. See [the examples](https://github.com/env-logger-rs/env_logger/tree/master/examples) for more approaches. +`env_logger` can be configured in other ways besides an environment variable. See [the examples](https://github.com/env-logger-rs/env_logger/tree/main/examples) for more approaches. ### In tests diff --git a/src/fmt/writer/termcolor/extern_impl.rs b/src/fmt/writer/termcolor/extern_impl.rs index 11012fb1..7a9ef16d 100644 --- a/src/fmt/writer/termcolor/extern_impl.rs +++ b/src/fmt/writer/termcolor/extern_impl.rs @@ -453,7 +453,7 @@ impl_styled_value_fmt!( fmt::LowerExp ); -// The `Color` type is copied from https://github.com/BurntSushi/ripgrep/tree/master/termcolor +// The `Color` type is copied from https://github.com/BurntSushi/termcolor /// The set of available colors for the terminal foreground/background. /// diff --git a/src/lib.rs b/src/lib.rs index 85041085..0eb3e11f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,10 @@ // Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. +// https://www.rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license -// , at your +// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// , at your // option. This file may not be copied, modified, or distributed // except according to those terms. From a08e0227e707f82a14a8b3b40518bb3d48660439 Mon Sep 17 00:00:00 2001 From: Lukas Kalbertodt Date: Mon, 11 Oct 2021 20:20:49 +0200 Subject: [PATCH 03/15] Add `Style::set_dimmed` to support dimmed text --- Cargo.toml | 2 +- src/fmt/writer/termcolor/extern_impl.rs | 27 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 29c77b3b..ad2b27ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ members = [ [dependencies] log = { version = "0.4.8", features = ["std"] } regex = { version = "1.0.3", optional = true, default-features=false, features=["std", "perf"] } -termcolor = { version = "1.0.2", optional = true } +termcolor = { version = "1.1.1", optional = true } humantime = { version = "2.0.0", optional = true } atty = { version = "0.2.5", optional = true } diff --git a/src/fmt/writer/termcolor/extern_impl.rs b/src/fmt/writer/termcolor/extern_impl.rs index 11012fb1..5068ce84 100644 --- a/src/fmt/writer/termcolor/extern_impl.rs +++ b/src/fmt/writer/termcolor/extern_impl.rs @@ -339,6 +339,33 @@ impl Style { self } + /// Set whether the text is dimmed. + /// + /// If `yes` is true then text will be written in a dimmer color. + /// If `yes` is false then text will be written in the default color. + /// + /// # Examples + /// + /// Create a style with dimmed text: + /// + /// ``` + /// use std::io::Write; + /// + /// let mut builder = env_logger::Builder::new(); + /// + /// builder.format(|buf, record| { + /// let mut style = buf.style(); + /// + /// style.set_dimmed(true); + /// + /// writeln!(buf, "{}", style.value(record.args())) + /// }); + /// ``` + pub fn set_dimmed(&mut self, yes: bool) -> &mut Style { + self.spec.set_dimmed(yes); + self + } + /// Set the background color. /// /// # Examples From b1575b5ae3edfb379313ac01853a39bbbe71723e Mon Sep 17 00:00:00 2001 From: George Date: Sat, 17 Sep 2022 20:59:57 +0300 Subject: [PATCH 04/15] Fix typo --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0eb3e11f..f2bc5504 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -107,7 +107,7 @@ //! your program is in a file called, for example, `hello.rs`, the path would //! simply be be `hello`. //! -//! Furthermore, the the log can be filtered using prefix-search based on the +//! Furthermore, the log can be filtered using prefix-search based on the //! specified log target. A value of, for example, `RUST_LOG=example`, would //! match all of the messages with targets: //! From 22590b4a5a1e1f411494bb3dbcdc5ae41f85928c Mon Sep 17 00:00:00 2001 From: Alex Touchet Date: Sat, 17 Sep 2022 11:00:30 -0700 Subject: [PATCH 05/15] Update version number in Readme and use SPDX license format --- Cargo.toml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ad2b27ff..a5e18844 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "env_logger" edition = "2018" version = "0.9.0" authors = ["The Rust Project Developers"] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/env-logger-rs/env_logger/" documentation = "https://docs.rs/env_logger" diff --git a/README.md b/README.md index dd2884e9..049581d9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ It must be added along with `log` to the project dependencies: ```toml [dependencies] log = "0.4.0" -env_logger = "0.8.4" +env_logger = "0.9.0" ``` `env_logger` must be initialized as early as possible in the project. After it's initialized, you can use the `log` macros to do actual logging. @@ -88,7 +88,7 @@ Tests can use the `env_logger` crate to see log messages generated during that t log = "0.4.0" [dev-dependencies] -env_logger = "0.8.4" +env_logger = "0.9.0" ``` ```rust From 0ae49ca8f22ffffe10be2e35a4b491bc45f59f0f Mon Sep 17 00:00:00 2001 From: David Stangl Date: Sat, 17 Sep 2022 20:01:54 +0200 Subject: [PATCH 06/15] Fix docs of Builder::filter_level --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index f2bc5504..393eeb38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -676,7 +676,7 @@ impl Builder { /// /// # Examples /// - /// Only include messages for info and above for logs in `path::to::module`: + /// Only include messages for info and above for logs globally: /// /// ``` /// use env_logger::Builder; From 38643a3e069f24b68838002fd5f5010df0dfb9d9 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 17 Sep 2022 20:04:29 +0200 Subject: [PATCH 07/15] Remove bogus copyright info --- Cargo.toml | 1 - LICENSE-MIT | 2 -- ci/Cargo.toml | 1 - src/lib.rs | 4 ---- 4 files changed, 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a5e18844..73b23628 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,6 @@ name = "env_logger" edition = "2018" version = "0.9.0" -authors = ["The Rust Project Developers"] license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/env-logger-rs/env_logger/" diff --git a/LICENSE-MIT b/LICENSE-MIT index 39d4bdb5..31aa7938 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,5 +1,3 @@ -Copyright (c) 2014 The Rust Project Developers - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the diff --git a/ci/Cargo.toml b/ci/Cargo.toml index 87258b6b..a2c8df58 100644 --- a/ci/Cargo.toml +++ b/ci/Cargo.toml @@ -2,7 +2,6 @@ name = "ci" edition = "2018" version = "0.0.0" -authors = ["The Rust Project Developers"] publish = false [dependencies] diff --git a/src/lib.rs b/src/lib.rs index 393eeb38..642b731a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,3 @@ -// Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// https://www.rust-lang.org/COPYRIGHT. -// // Licensed under the Apache License, Version 2.0 or the MIT license // , at your From ade9f7f74eef3c2108721d54f481ae522dbc4acc Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 17 Sep 2022 20:10:05 +0200 Subject: [PATCH 08/15] Remove "actively maintaned" badge --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 049581d9..75add88f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # env_logger -[![Maintenance](https://img.shields.io/badge/maintenance-actively%20maintained-brightgreen.svg)](https://github.com/env-logger-rs/env_logger) [![crates.io](https://img.shields.io/crates/v/env_logger.svg)](https://crates.io/crates/env_logger) [![Documentation](https://docs.rs/env_logger/badge.svg)](https://docs.rs/env_logger) [![Documentation](https://img.shields.io/badge/docs-main-blue.svg)](https://env-logger-rs.github.io/env_logger/env_logger/index.html) -========== Implements a logger that can be configured via environment variables. From 26d4a472aa2b8f44965fbee537945cc9e3ea67bf Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 17 Sep 2022 20:15:12 +0200 Subject: [PATCH 09/15] Deprecate Target::Pipe since it is broken --- src/fmt/writer/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fmt/writer/mod.rs b/src/fmt/writer/mod.rs index 5bb53539..a0588fc8 100644 --- a/src/fmt/writer/mod.rs +++ b/src/fmt/writer/mod.rs @@ -20,6 +20,10 @@ pub enum Target { /// Logs will be sent to standard error. Stderr, /// Logs will be sent to a custom pipe. + #[deprecated = "\ + This functionality is [broken](https://github.com/env-logger-rs/env_logger/issues/208) \ + and nobody is working on fixing it\ + "] Pipe(Box), } @@ -37,6 +41,7 @@ impl fmt::Debug for Target { match self { Self::Stdout => "stdout", Self::Stderr => "stderr", + #[allow(deprecated)] Self::Pipe(_) => "pipe", } ) @@ -60,6 +65,7 @@ impl From for WritableTarget { match target { Target::Stdout => Self::Stdout, Target::Stderr => Self::Stderr, + #[allow(deprecated)] Target::Pipe(pipe) => Self::Pipe(Box::new(Mutex::new(pipe))), } } From 5b887250fbde31766863ea20c7c95ccdd6fda454 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 17 Sep 2022 20:15:27 +0200 Subject: [PATCH 10/15] Remove custom_target example It used the broken Target::Pipe feature. --- examples/custom_target.rs | 81 --------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 examples/custom_target.rs diff --git a/examples/custom_target.rs b/examples/custom_target.rs deleted file mode 100644 index 384d244a..00000000 --- a/examples/custom_target.rs +++ /dev/null @@ -1,81 +0,0 @@ -/*! -Using `env_logger`. - -Before running this example, try setting the `MY_LOG_LEVEL` environment variable to `info`: - -```no_run,shell -$ export MY_LOG_LEVEL='info' -``` - -Also try setting the `MY_LOG_STYLE` environment variable to `never` to disable colors -or `auto` to enable them: - -```no_run,shell -$ export MY_LOG_STYLE=never -``` -*/ - -#[macro_use] -extern crate log; - -use env_logger::{Builder, Env, Target}; -use std::{ - io, - sync::mpsc::{channel, Sender}, -}; - -// This struct is used as an adaptor, it implements io::Write and forwards the buffer to a mpsc::Sender -struct WriteAdapter { - sender: Sender, -} - -impl io::Write for WriteAdapter { - // On write we forward each u8 of the buffer to the sender and return the length of the buffer - fn write(&mut self, buf: &[u8]) -> io::Result { - for chr in buf { - self.sender.send(*chr).unwrap(); - } - Ok(buf.len()) - } - - fn flush(&mut self) -> io::Result<()> { - Ok(()) - } -} - -fn main() { - // The `Env` lets us tweak what the environment - // variables to read are and what the default - // value is if they're missing - let env = Env::default() - .filter_or("MY_LOG_LEVEL", "trace") - // Normally using a pipe as a target would mean a value of false, but this forces it to be true. - .write_style_or("MY_LOG_STYLE", "always"); - - // Create the channel for the log messages - let (rx, tx) = channel(); - - Builder::from_env(env) - // The Sender of the channel is given to the logger - // A wrapper is needed, because the `Sender` itself doesn't implement `std::io::Write`. - .target(Target::Pipe(Box::new(WriteAdapter { sender: rx }))) - .init(); - - trace!("some trace log"); - debug!("some debug log"); - info!("some information log"); - warn!("some warning log"); - error!("some error log"); - - // Collect all messages send to the channel and parse the result as a string - String::from_utf8(tx.try_iter().collect::>()) - .unwrap() - // Split the result into lines so a prefix can be added to each line - .split('\n') - .for_each(|msg| { - // Print the message with a prefix if it has any content - if !msg.is_empty() { - println!("from pipe: {}", msg) - } - }); -} From 4a106452cc7cc97c63ed12074ddebf7e2f65b111 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 17 Sep 2022 20:17:36 +0200 Subject: [PATCH 11/15] Release version 0.9.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 73b23628..5b42b83e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "env_logger" edition = "2018" -version = "0.9.0" +version = "0.9.1" license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/env-logger-rs/env_logger/" From 9edf205f7c7f0e76887330aebe820a69ebabea08 Mon Sep 17 00:00:00 2001 From: niklas Date: Mon, 3 Oct 2022 12:51:22 +0200 Subject: [PATCH 12/15] Revert "Deprecate Target::Pipe since it is broken" This reverts commit 26d4a472aa2b8f44965fbee537945cc9e3ea67bf. --- src/fmt/writer/mod.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/fmt/writer/mod.rs b/src/fmt/writer/mod.rs index a0588fc8..5bb53539 100644 --- a/src/fmt/writer/mod.rs +++ b/src/fmt/writer/mod.rs @@ -20,10 +20,6 @@ pub enum Target { /// Logs will be sent to standard error. Stderr, /// Logs will be sent to a custom pipe. - #[deprecated = "\ - This functionality is [broken](https://github.com/env-logger-rs/env_logger/issues/208) \ - and nobody is working on fixing it\ - "] Pipe(Box), } @@ -41,7 +37,6 @@ impl fmt::Debug for Target { match self { Self::Stdout => "stdout", Self::Stderr => "stderr", - #[allow(deprecated)] Self::Pipe(_) => "pipe", } ) @@ -65,7 +60,6 @@ impl From for WritableTarget { match target { Target::Stdout => Self::Stdout, Target::Stderr => Self::Stderr, - #[allow(deprecated)] Target::Pipe(pipe) => Self::Pipe(Box::new(Mutex::new(pipe))), } } From 84b701dac94e4135f59f069a8c155bb9b7922788 Mon Sep 17 00:00:00 2001 From: niklas Date: Mon, 4 Jul 2022 11:30:14 +0200 Subject: [PATCH 13/15] Change Pipe to always use the test (uncolored) semantics Pipe only worked in test contexts before. --- src/fmt/writer/mod.rs | 2 +- src/fmt/writer/termcolor/extern_impl.rs | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/fmt/writer/mod.rs b/src/fmt/writer/mod.rs index 5bb53539..2b56772e 100644 --- a/src/fmt/writer/mod.rs +++ b/src/fmt/writer/mod.rs @@ -193,7 +193,7 @@ impl Builder { let writer = match mem::take(&mut self.target) { WritableTarget::Stderr => BufferWriter::stderr(self.is_test, color_choice), WritableTarget::Stdout => BufferWriter::stdout(self.is_test, color_choice), - WritableTarget::Pipe(pipe) => BufferWriter::pipe(self.is_test, color_choice, pipe), + WritableTarget::Pipe(pipe) => BufferWriter::pipe(color_choice, pipe), }; Writer { diff --git a/src/fmt/writer/termcolor/extern_impl.rs b/src/fmt/writer/termcolor/extern_impl.rs index f7ed8a5c..fbe37a77 100644 --- a/src/fmt/writer/termcolor/extern_impl.rs +++ b/src/fmt/writer/termcolor/extern_impl.rs @@ -71,19 +71,19 @@ impl Formatter { pub(in crate::fmt::writer) struct BufferWriter { inner: termcolor::BufferWriter, - test_target: Option, + uncolored_target: Option, } pub(in crate::fmt) struct Buffer { inner: termcolor::Buffer, - has_test_target: bool, + has_uncolored_target: bool, } impl BufferWriter { pub(in crate::fmt::writer) fn stderr(is_test: bool, write_style: WriteStyle) -> Self { BufferWriter { inner: termcolor::BufferWriter::stderr(write_style.into_color_choice()), - test_target: if is_test { + uncolored_target: if is_test { Some(WritableTarget::Stderr) } else { None @@ -94,7 +94,7 @@ impl BufferWriter { pub(in crate::fmt::writer) fn stdout(is_test: bool, write_style: WriteStyle) -> Self { BufferWriter { inner: termcolor::BufferWriter::stdout(write_style.into_color_choice()), - test_target: if is_test { + uncolored_target: if is_test { Some(WritableTarget::Stdout) } else { None @@ -103,30 +103,25 @@ impl BufferWriter { } pub(in crate::fmt::writer) fn pipe( - is_test: bool, write_style: WriteStyle, pipe: Box>, ) -> Self { BufferWriter { // The inner Buffer is never printed from, but it is still needed to handle coloring and other formating inner: termcolor::BufferWriter::stderr(write_style.into_color_choice()), - test_target: if is_test { - Some(WritableTarget::Pipe(pipe)) - } else { - None - }, + uncolored_target: Some(WritableTarget::Pipe(pipe)), } } pub(in crate::fmt::writer) fn buffer(&self) -> Buffer { Buffer { inner: self.inner.buffer(), - has_test_target: self.test_target.is_some(), + has_uncolored_target: self.uncolored_target.is_some(), } } pub(in crate::fmt::writer) fn print(&self, buf: &Buffer) -> io::Result<()> { - if let Some(target) = &self.test_target { + if let Some(target) = &self.uncolored_target { // This impl uses the `eprint` and `print` macros // instead of `termcolor`'s buffer. // This is so their output can be captured by `cargo test` @@ -164,7 +159,7 @@ impl Buffer { fn set_color(&mut self, spec: &ColorSpec) -> io::Result<()> { // Ignore styles for test captured logs because they can't be printed - if !self.has_test_target { + if !self.has_uncolored_target { self.inner.set_color(spec) } else { Ok(()) @@ -173,7 +168,7 @@ impl Buffer { fn reset(&mut self) -> io::Result<()> { // Ignore styles for test captured logs because they can't be printed - if !self.has_test_target { + if !self.has_uncolored_target { self.inner.reset() } else { Ok(()) From c89f719621c2660062a4cbbe5ed8bef44837bd4d Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 7 Nov 2022 11:19:12 +0100 Subject: [PATCH 14/15] Fix clippy lints --- ci/src/task.rs | 2 +- src/filter/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/src/task.rs b/ci/src/task.rs index 5cd9a70e..ed55bdda 100644 --- a/ci/src/task.rs +++ b/ci/src/task.rs @@ -58,7 +58,7 @@ pub fn test(args: TestArgs) -> bool { } if let Some(ref features) = features { - command.args(&["--features", features]); + command.args(["--features", features]); } println!("running {:?}", command); diff --git a/src/filter/mod.rs b/src/filter/mod.rs index 9ebeab0b..a02d6bc1 100644 --- a/src/filter/mod.rs +++ b/src/filter/mod.rs @@ -151,7 +151,7 @@ impl Filter { } if let Some(filter) = self.filter.as_ref() { - if !filter.is_match(&*record.args().to_string()) { + if !filter.is_match(&record.args().to_string()) { return false; } } From 555cbc2f319e163faef6d27039979b2cee201d73 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 7 Nov 2022 11:16:29 +0100 Subject: [PATCH 15/15] Release version 0.9.2 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5b42b83e..aca247bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "env_logger" edition = "2018" -version = "0.9.1" +version = "0.9.2" license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github.com/env-logger-rs/env_logger/"