From bd5bb6cc27c058ce736ddd2fef8e6d220f023699 Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Mon, 22 Aug 2022 13:17:32 +0200 Subject: [PATCH] Rename disable->std-log, bump version --- CHANGELOG.md | 3 +++ Cargo.toml | 6 +++--- src/macros.rs | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3880b68..10f376b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.6] - 2022-08-22 +- `std-log` feature to use normal logging for testing etc. @robin-nitrokey + ## [0.1.5]- 2022-06-25 - fix incorrect MIT license copyright info diff --git a/Cargo.toml b/Cargo.toml index c39a543..ee47c19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "delog" -version = "0.1.5" +version = "0.1.6" description = "Deferred logging, an implementation and extension of Rust's standard logging facade." authors = ["Trussed Developers"] license = "Apache-2.0 OR MIT" @@ -25,8 +25,8 @@ insta = "1.7" example = ["std"] # sole reason for this is to enable `print!` in the example's `Std{err,out}Flusher` std = [] -# disable deferred logging and use log::log instead -disable = [] +# replace deferred logging with log::log +std-log = [] max_level_off = ["log/max_level_off"] max_level_error = ["log/max_level_error"] diff --git a/src/macros.rs b/src/macros.rs index 195824c..9eab36e 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -1,7 +1,7 @@ /// Fallible (ungated) version of `log!`. #[macro_export] #[doc(hidden)] -#[cfg(not(feature = "disable"))] +#[cfg(not(feature = "std-log"))] macro_rules! try_log { (target: $target:expr, $lvl:expr, $message:expr) => ({ @@ -37,7 +37,7 @@ macro_rules! try_log { #[macro_export] #[doc(hidden)] -#[cfg(feature = "disable")] +#[cfg(feature = "std-log")] macro_rules! try_log { (target: $target:expr, $lvl:expr, $message:expr) => ({