diff options
author | Francis Lavoie <lavofr@gmail.com> | 2022-02-19 17:10:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-19 15:10:49 -0700 |
commit | ddbb234d91246396b52d9de51f112ac2f5388829 (patch) | |
tree | eae9f8a3e0146769a5a38bbcf1fe5d139ec4534a | |
parent | 0de51593a647ee68ae79643f137ae2486118a6e6 (diff) |
caddyhttp: Always log handled errors at debug level (#4584)
-rw-r--r-- | modules/caddyhttp/server.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go index 964b2a4..fa153cd 100644 --- a/modules/caddyhttp/server.go +++ b/modules/caddyhttp/server.go @@ -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{ |