Skip to content

Commit 19af292

Browse files
authored
chore: fix tracing-macros::dbg (#1054)
…and the `factorial` example.
1 parent cd911e0 commit 19af292

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

tracing-macros/Cargo.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,10 @@ keywords = ["logging", "tracing"]
1717
license = "MIT"
1818

1919
[dependencies]
20-
tracing = "0.1.18"
20+
tracing = "0.1.20"
2121

2222
[dev-dependencies]
23-
tracing-log = "0.1"
24-
env_logger = "0.7"
23+
tracing-subscriber = "0.2"
2524

2625
[badges]
2726
maintenance = { status = "experimental" }

tracing-macros/examples/factorial.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ fn factorial(n: u32) -> u32 {
1212
}
1313

1414
fn main() {
15-
env_logger::Builder::new().parse_filters("trace").init();
16-
#[allow(deprecated)]
17-
let subscriber = tracing_log::TraceLogger::new();
15+
let subscriber = tracing_subscriber::fmt().finish();
1816

1917
tracing::subscriber::with_default(subscriber, || dbg!(factorial(4)));
2018
}

0 commit comments

Comments
 (0)