chore: add custom log level support for common_telemetry::init_default_ut_logging() (#864)

chore: improve default ut logging
This commit is contained in:
elijah
2023-01-11 16:52:21 +08:00
committed by GitHub
parent a9b42b436d
commit 0e8411c2ff

View File

@@ -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);
});