Decrease Log severity

of failing requests because it's likely that another error with more information has already been reported.
This commit is contained in:
Maximilian Paß
2023-11-29 13:28:51 +01:00
committed by Sebastian Serth
parent 6102759b7c
commit c9922e2539
2 changed files with 1 additions and 21 deletions

View File

@ -93,11 +93,7 @@ func HTTPLoggingMiddleware(next http.Handler) http.Handler {
"duration": latency,
"user_agent": RemoveNewlineSymbol(r.UserAgent()),
})
if lrw.StatusCode >= http.StatusInternalServerError {
logEntry.Error("Failing " + path)
} else {
logEntry.Debug()
}
logEntry.Debug()
})
}