From 1a4564d9985c8ae19f333c060dbfd67efe34f65d Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Sat, 18 Nov 2017 01:10:03 +0100 Subject: [PATCH] http.Server log goes to Debug level. --- server/server.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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