Skip to content

Commit

Permalink
Add logs when error is generated in error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
juliens authored and traefiker committed Jul 6, 2018
1 parent f323df4 commit bacd58e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/errorhandler.go
Expand Up @@ -5,6 +5,7 @@ import (
"net"
"net/http"

"github.com/containous/traefik/log"
"github.com/containous/traefik/middlewares"
)

Expand Down Expand Up @@ -37,4 +38,5 @@ func (eh *RecordingErrorHandler) ServeHTTP(w http.ResponseWriter, req *http.Requ

w.WriteHeader(statusCode)
w.Write([]byte(http.StatusText(statusCode)))
log.Debugf("'%d %s' caused by: %v", statusCode, http.StatusText(statusCode), err)
}

0 comments on commit bacd58e

Please sign in to comment.