We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaaf330 commit bfd4f9eCopy full SHA for bfd4f9e
1 file changed
internal/logging/gin_middleware.go
@@ -20,10 +20,10 @@ func GinLogger() gin.HandlerFunc {
20
21
// Calculate latency
22
latency := time.Since(start)
23
-
+
24
// Get status code
25
statusCode := c.Writer.Status()
26
27
// Build the query string if present
28
if raw != "" {
29
path = path + "?" + raw
@@ -39,11 +39,11 @@ func GinLogger() gin.HandlerFunc {
39
)
40
41
if statusCode >= 500 {
42
- Error(msg)
+ Error("%s", msg)
43
} else if statusCode >= 400 {
44
- Warn(msg)
+ Warn("%s", msg)
45
} else {
46
- Debug(msg) // HTTP requests are debug level
+ Debug("%s", msg) // HTTP requests are debug level
47
}
48
49
0 commit comments