chore: gin logging opt

This commit is contained in:
engigu
2025-12-27 13:47:43 +08:00
parent c1dc460256
commit e22d285add
+1 -1
View File
@@ -37,7 +37,7 @@ func GinLogger() gin.HandlerFunc {
latencyStr = fmt.Sprintf("%.2fs", latency.Seconds()) latencyStr = fmt.Sprintf("%.2fs", latency.Seconds())
} }
msg := fmt.Sprintf("[HTTP] %d %s %s %s %s", status, method, path, latencyStr, clientIP) msg := fmt.Sprintf("[HTTP] %d %s %s %s [%s]", status, method, path, latencyStr, clientIP)
if status >= 500 { if status >= 500 {
logger.Error(msg) logger.Error(msg)