forked from TrueCloudLab/frostfs-s3-gw
[#728] Remove redundant log message
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
This commit is contained in:
parent
bbd7ba670a
commit
712740b668
3 changed files with 12 additions and 17 deletions
|
@ -154,16 +154,8 @@ func logErrorResponse(l *zap.Logger) mux.MiddlewareFunc {
|
|||
// pass execution:
|
||||
h.ServeHTTP(lw, r)
|
||||
|
||||
// Ignore <300 status codes
|
||||
if lw.statusCode >= http.StatusMultipleChoices {
|
||||
l.Error("something went wrong",
|
||||
zap.Int("status", lw.statusCode),
|
||||
zap.String("request_id", GetRequestID(r.Context())),
|
||||
zap.String("method", mux.CurrentRoute(r).GetName()),
|
||||
zap.String("bucket", reqInfo.BucketName),
|
||||
zap.String("object", reqInfo.ObjectName),
|
||||
zap.String("description", http.StatusText(lw.statusCode)))
|
||||
|
||||
// Ignore >400 status codes
|
||||
if lw.statusCode >= http.StatusBadRequest {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue