Skip to content

Commit

Permalink
examples: use tempfile infmt-multiple-writers
Browse files Browse the repository at this point in the history
Whoops, this example _also_ uses `tempdir`. My bad!

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
hawkw committed Aug 17, 2021
1 parent 1b8fce9 commit e6c53e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/examples/fmt-multiple-writers.rs
Expand Up @@ -5,11 +5,10 @@
mod yak_shave;

use std::io;
use tempdir::TempDir;
use tracing_subscriber::{fmt, layer::SubscriberExt, EnvFilter};

fn main() {
let dir = TempDir::new("directory").expect("Failed to create tempdir");
let dir = tempfile::tempdir().expect("Failed to create tempdir");

let file_appender = tracing_appender::rolling::hourly(dir, "example.log");
let (non_blocking, _guard) = tracing_appender::non_blocking(file_appender);
Expand Down

0 comments on commit e6c53e6

Please sign in to comment.