feat: app log level add silent

This commit is contained in:
GyDi
2023-07-22 09:25:54 +08:00
parent aadfaf7150
commit 6b0ca2966e
3 changed files with 11 additions and 7 deletions

View File

@@ -18,6 +18,9 @@ fn init_log() -> Result<()> {
}
let log_level = Config::verge().data().get_log_level();
if log_level == LevelFilter::Off {
return Ok(());
}
let local_time = Local::now().format("%Y-%m-%d-%H%M").to_string();
let log_file = format!("{}.log", local_time);