From 25f0819eddb8365343530403906443b5e6f12ad4 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 25 Oct 2024 13:15:13 -0400 Subject: [PATCH] feat(naga-cli)!: init. logger to `INFO` by default --- Cargo.lock | 1 + naga-cli/Cargo.toml | 1 + naga-cli/src/bin/naga.rs | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 8ab3d854b..92035455d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1912,6 +1912,7 @@ dependencies = [ "bincode", "codespan-reporting", "env_logger", + "log", "naga", ] diff --git a/naga-cli/Cargo.toml b/naga-cli/Cargo.toml index a42975921..02f68cc02 100644 --- a/naga-cli/Cargo.toml +++ b/naga-cli/Cargo.toml @@ -23,6 +23,7 @@ codespan-reporting.workspace = true env_logger.workspace = true argh.workspace = true anyhow.workspace = true +log.workspace = true [dependencies.naga] version = "23.0.0" diff --git a/naga-cli/src/bin/naga.rs b/naga-cli/src/bin/naga.rs index f19bd15d2..6523b2102 100644 --- a/naga-cli/src/bin/naga.rs +++ b/naga-cli/src/bin/naga.rs @@ -375,7 +375,10 @@ impl fmt::Display for CliError { impl std::error::Error for CliError {} fn run() -> anyhow::Result<()> { - env_logger::init(); + env_logger::builder() + .filter_level(log::LevelFilter::Info) + .parse_default_env() + .init(); // Parse commandline arguments let args: Args = argh::from_env();