Skip to content

Commit 0e8411c

Browse files
authored
chore: add custom log level support for common_telemetry::init_default_ut_logging() (#864)
chore: improve default ut logging
1 parent a9b42b4 commit 0e8411c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/telemetry/src/logging.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ pub fn init_default_ut_logging() {
4545
let dir =
4646
env::var("UNITTEST_LOG_DIR").unwrap_or_else(|_| "/tmp/__unittest_logs".to_string());
4747

48-
*g = Some(init_global_logging("unittest", &dir, "DEBUG", false));
48+
let level = env::var("UNITTEST_LOG_LEVEL").unwrap_or_else(|_| "DEBUG".to_string());
49+
*g = Some(init_global_logging("unittest", &dir, &level, false));
4950

5051
info!("logs dir = {}", dir);
5152
});

0 commit comments

Comments
 (0)