diff --git a/server/server.go b/server/server.go index a1c9c63ed..97f980661 100644 --- a/server/server.go +++ b/server/server.go @@ -8,6 +8,7 @@ import ( "errors" "fmt" "io/ioutil" + stdlog "log" "net" "net/http" "net/url" @@ -19,6 +20,7 @@ import ( "sync" "time" + "github.com/Sirupsen/logrus" "github.com/armon/go-proxyproto" "github.com/containous/mux" "github.com/containous/traefik/cluster" @@ -46,7 +48,8 @@ import ( ) var ( - oxyLogger = &OxyLogger{} + oxyLogger = &OxyLogger{} + httpServerLogger = stdlog.New(log.WriterLevel(logrus.DebugLevel), "", 0) ) // Server is the reverse-proxy/load-balancer engine @@ -665,7 +668,7 @@ func (server *Server) prepareServer(entryPointName string, entryPoint *configura SourceCheck: func(addr net.Addr) (bool, error) { ip, ok := addr.(*net.TCPAddr) if !ok { - return false, fmt.Errorf("Type error %v", addr) + return false, fmt.Errorf("type error %v", addr) } return IPs.ContainsIP(ip.IP) }, @@ -679,6 +682,7 @@ func (server *Server) prepareServer(entryPointName string, entryPoint *configura ReadTimeout: readTimeout, WriteTimeout: writeTimeout, IdleTimeout: idleTimeout, + ErrorLog: httpServerLogger, }, listener, nil