From 19af2924f1bcf9c458264a420adc5b77ae17e93e Mon Sep 17 00:00:00 2001 From: David Date: Mon, 19 Oct 2020 23:39:57 +0200 Subject: [PATCH] chore: fix tracing-macros::dbg (#1054) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …and the `factorial` example. --- tracing-macros/Cargo.toml | 5 ++--- tracing-macros/examples/factorial.rs | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tracing-macros/Cargo.toml b/tracing-macros/Cargo.toml index c49adb98c5..82fb8b579e 100644 --- a/tracing-macros/Cargo.toml +++ b/tracing-macros/Cargo.toml @@ -17,11 +17,10 @@ keywords = ["logging", "tracing"] license = "MIT" [dependencies] -tracing = "0.1.18" +tracing = "0.1.20" [dev-dependencies] -tracing-log = "0.1" -env_logger = "0.7" +tracing-subscriber = "0.2" [badges] maintenance = { status = "experimental" } diff --git a/tracing-macros/examples/factorial.rs b/tracing-macros/examples/factorial.rs index c5257f08f8..a089e019e1 100644 --- a/tracing-macros/examples/factorial.rs +++ b/tracing-macros/examples/factorial.rs @@ -12,9 +12,7 @@ fn factorial(n: u32) -> u32 { } fn main() { - env_logger::Builder::new().parse_filters("trace").init(); - #[allow(deprecated)] - let subscriber = tracing_log::TraceLogger::new(); + let subscriber = tracing_subscriber::fmt().finish(); tracing::subscriber::with_default(subscriber, || dbg!(factorial(4))); }