Skip to content

Commit

Permalink
egui_demo_app: include log::trace in debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Jul 1, 2024
1 parent 7b61e42 commit 0fc79ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/egui_demo_app/src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 0fc79ae

Please sign in to comment.