From 1c80b02f5844b35af4e84841983e8ecfa37b1fc7 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 11 Jan 2023 15:50:40 +0800 Subject: [PATCH] chore: improve default ut logging --- src/common/telemetry/src/logging.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/telemetry/src/logging.rs b/src/common/telemetry/src/logging.rs index ad2d1957bdaf..d09ee9463691 100644 --- a/src/common/telemetry/src/logging.rs +++ b/src/common/telemetry/src/logging.rs @@ -45,7 +45,8 @@ pub fn init_default_ut_logging() { let dir = env::var("UNITTEST_LOG_DIR").unwrap_or_else(|_| "/tmp/__unittest_logs".to_string()); - *g = Some(init_global_logging("unittest", &dir, "DEBUG", false)); + let level = env::var("UNITTEST_LOG_LEVEL").unwrap_or_else(|_| "DEBUG".to_string()); + *g = Some(init_global_logging("unittest", &dir, &level, false)); info!("logs dir = {}", dir); });