fix(logging): disable ansi escapes in file logs

This commit is contained in:
2026-04-23 05:49:18 +08:00
parent d9040be059
commit 9f399ddb89
3 changed files with 7 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ pub fn init_tracing(default_filter: &str) -> Result<(), io::Error> {
fmt()
.with_env_filter(env_filter)
.with_target(true)
.with_ansi(false)
.compact()
.try_init()
.map_err(|error| io::Error::other(format!("初始化 tracing subscriber 失败:{error}")))