fix: suppress /version /health /healthz probe noise in access logs
This commit is contained in:
1 parent
d65cc34354
commit
d52fe8749d
1 file changed
+5
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user