优化,日志脱敏

This commit is contained in:
truewhile
2026-09-14 15:12:42 +08:00
parent 5c85478883
commit 3aa8662c45
31 changed files with 1220 additions and 1099 deletions
+6 -1
View File
@@ -127,5 +127,10 @@ func (z zapStdLogger) Printf(format string, args ...interface{}) {
if z.log == nil {
return
}
z.log.Sugar().Infof(format, args...)
message := fmt.Sprintf(format, args...)
if strings.Contains(strings.ToLower(message), "context canceled") {
z.log.Debug(message)
return
}
z.log.Info(message)
}