Skip to content

Commit

Permalink
Gin logger only logs unsuccessful requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny-Wei committed Jul 8, 2024
1 parent cbb4294 commit 3534ce2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ func GinLogger() gin.HandlerFunc {
param.Path,
param.ErrorMessage)

if param.StatusCode >= 400 {
if param.StatusCode&200 != 200 {
return "E" + o
}
return "I" + o
return ""
})
}

0 comments on commit 3534ce2

Please sign in to comment.