From 117ec364f9d3b3606eebe25c04566ca756debbda Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 18 Feb 2026 12:57:21 +0100 Subject: [PATCH] examples: Always use tracing helper module --- winit/examples/pump_events.rs | 4 +++- winit/examples/run_on_demand.rs | 4 +++- winit/examples/x11_embed.rs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/winit/examples/pump_events.rs b/winit/examples/pump_events.rs index b8f05a050..181fb366a 100644 --- a/winit/examples/pump_events.rs +++ b/winit/examples/pump_events.rs @@ -16,6 +16,8 @@ fn main() -> std::process::ExitCode { #[path = "util/fill.rs"] mod fill; + #[path = "util/tracing.rs"] + mod tracing; #[derive(Default, Debug)] struct PumpDemo { @@ -52,7 +54,7 @@ fn main() -> std::process::ExitCode { } } - tracing_subscriber::fmt::init(); + tracing::init(); let mut event_loop = EventLoop::new().unwrap(); diff --git a/winit/examples/run_on_demand.rs b/winit/examples/run_on_demand.rs index 194f81a0f..a9df3cff9 100644 --- a/winit/examples/run_on_demand.rs +++ b/winit/examples/run_on_demand.rs @@ -14,6 +14,8 @@ fn main() -> Result<(), Box> { #[path = "util/fill.rs"] mod fill; + #[path = "util/tracing.rs"] + mod tracing; #[derive(Default, Debug)] struct App { @@ -70,7 +72,7 @@ fn main() -> Result<(), Box> { } } - tracing_subscriber::fmt::init(); + tracing::init(); let mut event_loop = EventLoop::new().unwrap(); diff --git a/winit/examples/x11_embed.rs b/winit/examples/x11_embed.rs index dd454de7c..b25d6ff39 100644 --- a/winit/examples/x11_embed.rs +++ b/winit/examples/x11_embed.rs @@ -11,6 +11,8 @@ fn main() -> Result<(), Box> { #[path = "util/fill.rs"] mod fill; + #[path = "util/tracing.rs"] + mod tracing; #[derive(Debug)] pub struct XEmbedDemo { @@ -58,7 +60,7 @@ fn main() -> Result<(), Box> { .ok_or("Expected a 32-bit X11 window ID as the first argument.")? .parse::()?; - tracing_subscriber::fmt::init(); + tracing::init(); let event_loop = EventLoop::new()?; Ok(event_loop.run_app(XEmbedDemo { parent_window_id, window: None })?)