mirror of
https://github.com/tokio-rs/tracing.git
synced 2026-04-20 00:15:51 +00:00
examples: use tempfile infmt-multiple-writers
Whoops, this example _also_ uses `tempdir`. My bad! Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user