From 0fc79aea1474ef0b1e21307816edd4e9cc49ef6f Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 1 Jul 2024 16:26:20 +0200 Subject: [PATCH] egui_demo_app: include `log::trace` in debug builds --- crates/egui_demo_app/src/web.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/egui_demo_app/src/web.rs b/crates/egui_demo_app/src/web.rs index ce06399b27f..8c64f30142e 100644 --- a/crates/egui_demo_app/src/web.rs +++ b/crates/egui_demo_app/src/web.rs @@ -18,7 +18,12 @@ impl WebHandle { #[wasm_bindgen(constructor)] pub fn new() -> Self { // Redirect [`log`] message to `console.log` and friends: - eframe::WebLogger::init(log::LevelFilter::Debug).ok(); + let log_level = if cfg!(debug_assertions) { + log::LevelFilter::Trace + } else { + log::LevelFilter::Debug + }; + eframe::WebLogger::init(log_level).ok(); Self { runner: eframe::WebRunner::new(),