Skip to content

Commit 0e20dfa

Browse files
author
dave horner
committed
feat(env-filter): allow set RUST_LOG=error to just print errors, silencing the underlying lib info/debug.
1 parent 8109070 commit 0e20dfa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

demos/viewer/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ zerocopy.workspace = true
1818

1919
fidget.workspace = true
2020
workspace-hack.workspace = true
21+
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
2122

2223
[features]
2324
default = ["jit"]

demos/viewer/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use eframe::{
55
egui,
66
egui_wgpu::{self, wgpu},
77
};
8-
use env_logger::Env;
98
use log::{debug, error, info};
109
use nalgebra::Point2;
1110
use notify::{Event, EventKind, Watcher};
@@ -223,7 +222,8 @@ fn render_3d<F: fidget::eval::Function + fidget::render::RenderHints>(
223222
}
224223

225224
fn main() -> Result<(), Box<dyn Error>> {
226-
env_logger::Builder::from_env(Env::default().default_filter_or("info"))
225+
tracing_subscriber::fmt()
226+
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
227227
.init();
228228
let args = Args::parse();
229229

0 commit comments

Comments
 (0)