fix: suppress /version /health /healthz probe noise in access logs

This commit is contained in:
attacker committed 2026-06-24 04:09:59 +00:00
1 parent d65cc34354
commit d52fe8749d
1 file changed
+5
+5
View File
@@ -57,6 +57,11 @@ func GinLogger(log *zap.Logger) gin.HandlerFunc {
c.Next()
// 跳过健康检查/探针路径的日志
if path == "/version" || path == "/health" || path == "/healthz" {
return
}
cost := time.Since(start)
status := c.Writer.Status()