feat(naga-cli)!: init. logger to INFO by default

This commit is contained in:
Erich Gubler 2024-10-25 13:15:13 -04:00 committed by Jim Blandy
parent 08c9d8c397
commit 25f0819edd
3 changed files with 6 additions and 1 deletions

1
Cargo.lock generated
View File

@ -1912,6 +1912,7 @@ dependencies = [
"bincode", "bincode",
"codespan-reporting", "codespan-reporting",
"env_logger", "env_logger",
"log",
"naga", "naga",
] ]

View File

@ -23,6 +23,7 @@ codespan-reporting.workspace = true
env_logger.workspace = true env_logger.workspace = true
argh.workspace = true argh.workspace = true
anyhow.workspace = true anyhow.workspace = true
log.workspace = true
[dependencies.naga] [dependencies.naga]
version = "23.0.0" version = "23.0.0"

View File

@ -375,7 +375,10 @@ impl fmt::Display for CliError {
impl std::error::Error for CliError {} impl std::error::Error for CliError {}
fn run() -> anyhow::Result<()> { fn run() -> anyhow::Result<()> {
env_logger::init(); env_logger::builder()
.filter_level(log::LevelFilter::Info)
.parse_default_env()
.init();
// Parse commandline arguments // Parse commandline arguments
let args: Args = argh::from_env(); let args: Args = argh::from_env();