From 5f5a48c8306cb1d5dc667602f700d4540726dece Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 8 May 2021 22:59:51 -0700 Subject: [PATCH] tidy up log levels for wgpu --- env-bootstrap/src/ringlog.rs | 2 ++ window/examples/wgpu.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/env-bootstrap/src/ringlog.rs b/env-bootstrap/src/ringlog.rs index 25d17f8fd..b7b575471 100644 --- a/env-bootstrap/src/ringlog.rs +++ b/env-bootstrap/src/ringlog.rs @@ -159,6 +159,8 @@ pub fn get_entries() -> Vec { pub fn setup_logger() { let mut builder = pretty_env_logger::formatted_timed_builder(); + builder.filter(Some("wgpu_core"), log::LevelFilter::Error); + builder.filter(Some("gfx_backend_metal"), log::LevelFilter::Error); if let Ok(s) = std::env::var("WEZTERM_LOG") { builder.parse_filters(&s); } else { diff --git a/window/examples/wgpu.rs b/window/examples/wgpu.rs index 294bfa3fd..abbcd756a 100644 --- a/window/examples/wgpu.rs +++ b/window/examples/wgpu.rs @@ -268,6 +268,8 @@ async fn spawn_window() -> anyhow::Result<()> { fn main() -> anyhow::Result<()> { let _ = pretty_env_logger::formatted_builder() + .filter(Some("wgpu_core"), log::LevelFilter::Error) + .filter(Some("gfx_backend_metal"), log::LevelFilter::Error) .filter_level(log::LevelFilter::Info) .try_init(); let conn = Connection::init()?;