Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http.Server log goes to Debug level. #2420

Merged
merged 1 commit into from
Nov 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"errors"
"fmt"
"io/ioutil"
stdlog "log"
"net"
"net/http"
"net/url"
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
},
Expand All @@ -679,6 +682,7 @@ func (server *Server) prepareServer(entryPointName string, entryPoint *configura
ReadTimeout: readTimeout,
WriteTimeout: writeTimeout,
IdleTimeout: idleTimeout,
ErrorLog: httpServerLogger,
},
listener,
nil
Expand Down