From d52fe8749dd0a2cddd6a188da5d160861cc5a622 Mon Sep 17 00:00:00 2001 From: attacker Date: Wed, 24 Jun 2026 04:09:59 +0000 Subject: [PATCH] fix: suppress /version /health /healthz probe noise in access logs --- backend/pkg/logger/logger.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/pkg/logger/logger.go b/backend/pkg/logger/logger.go index c086d0f..d7334dc 100644 --- a/backend/pkg/logger/logger.go +++ b/backend/pkg/logger/logger.go @@ -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()