caddyhttp: Always log handled errors at debug level (#4584)

This commit is contained in:
Francis Lavoie 2022-02-19 17:10:49 -05:00 committed by GitHub
parent 0de51593a6
commit ddbb234d91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -259,11 +259,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if err2 == nil {
// user's error route handled the error response
// successfully, so now just log the error
if errStatus >= 500 {
logger.Error(errMsg, errFields...)
} else {
logger.Debug(errMsg, errFields...)
}
logger.Debug(errMsg, errFields...)
} else {
// well... this is awkward
errFields = append([]zapcore.Field{