Skip to content

Commit

Permalink
caddyhttp: Always log handled errors at debug level (#4584)
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie committed Feb 19, 2022
1 parent 0de5159 commit ddbb234
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions modules/caddyhttp/server.go
Expand Up @@ -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{
Expand Down

0 comments on commit ddbb234

Please sign in to comment.