chore: gin logging opt
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user