Skip to content

Commit

Permalink
chore: add custom log level support for `common_telemetry::init_defau…
Browse files Browse the repository at this point in the history
…lt_ut_logging()` (GreptimeTeam#864)

chore: improve default ut logging
  • Loading branch information
e1ijah1 authored and paomian committed Oct 19, 2023
1 parent 209229a commit 723cab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/telemetry/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 723cab1

Please sign in to comment.