1
0

fix: 降低请求生命周期日志级别

This commit is contained in:
2026-05-05 01:54:53 +08:00
parent 7653385838
commit 9e33e570af
5 changed files with 77 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ func Logging(logger *zap.Logger) gin.HandlerFunc {
if id, ok := requestID.(string); ok {
requestIDStr = id
}
logger.Info("请求开始",
logger.Debug("请求开始",
pkglogger.Method(c.Request.Method),
pkglogger.Path(path),
pkglogger.Query(query),
@@ -33,7 +33,7 @@ func Logging(logger *zap.Logger) gin.HandlerFunc {
latency := time.Since(start)
statusCode := c.Writer.Status()
logger.Info("请求结束",
logger.Debug("请求结束",
pkglogger.StatusCode(statusCode),
pkglogger.Method(c.Request.Method),
pkglogger.Path(path),