Add logs when error is generated in error handler

This commit is contained in:
SALLEYRON Julien 2018-07-06 10:32:03 +02:00 committed by Traefiker Bot
parent f323df466d
commit bacd58ed7b

View file

@ -5,6 +5,7 @@ import (
"net"
"net/http"
"github.com/containous/traefik/log"
"github.com/containous/traefik/middlewares"
)
@ -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)
}