From be023eeae430502762c563389d0425838b620c2a Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Tue, 26 Nov 2024 16:20:27 +0800 Subject: [PATCH] default level to warn Signed-off-by: Bugen Zhao --- src/risedevtool/src/bin/risedev-dev.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/risedevtool/src/bin/risedev-dev.rs b/src/risedevtool/src/bin/risedev-dev.rs index e57adf7df219..8bf9aa52fe8f 100644 --- a/src/risedevtool/src/bin/risedev-dev.rs +++ b/src/risedevtool/src/bin/risedev-dev.rs @@ -32,6 +32,7 @@ use risedev::{ }; use tempfile::tempdir; use thiserror_ext::AsReport; +use tracing::level_filters::LevelFilter; use tracing_subscriber::EnvFilter; use yaml_rust::YamlEmitter; @@ -381,7 +382,12 @@ fn main() -> Result<()> { // Init logger from a customized env var. tracing_subscriber::fmt() - .with_env_filter(EnvFilter::from_env("RISEDEV_RUST_LOG")) + .with_env_filter( + EnvFilter::builder() + .with_default_directive(LevelFilter::WARN.into()) + .with_env_var("RISEDEV_RUST_LOG") + .from_env_lossy(), + ) .init(); preflight_check()?;