http.Server log goes to Debug level.

This commit is contained in:
Ludovic Fernandez 2017-11-18 01:10:03 +01:00 committed by Traefiker
parent 66be04f39e
commit 1a4564d998

View file

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