优化:清理运行日志调用栈绝对路径,并修复SMTP中继配置保存校验
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-14 12:58:04 +08:00
1 parent 064455d09d
commit 85cce0044e
6 files changed
+46 -5

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ func (l *logFormatter) Format(entry *log.Entry) ([]byte, error) {
}
}
if entry.Caller != nil {
b.WriteString(fmt.Sprintf("[%s:%d]", entry.Caller.File, entry.Caller.Line))
b.WriteString(fmt.Sprintf("[%s:%d]", runtimepath.CleanCallerPath(entry.Caller.File), entry.Caller.Line))
}
b.WriteString(entry.Message)
// 错误字段也是有效内容,不能在消息为空时被格式器丢弃。