This commit is contained in:
emile 2015-10-13 14:15:32 +02:00
parent 37438a6395
commit 4ea48c2d19

View file

@ -16,7 +16,6 @@ import (
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/codegangsta/negroni" "github.com/codegangsta/negroni"
"github.com/davecgh/go-spew/spew"
"github.com/emilevauge/traefik/middlewares" "github.com/emilevauge/traefik/middlewares"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"github.com/mailgun/manners" "github.com/mailgun/manners"
@ -88,7 +87,7 @@ func main() {
} else { } else {
log.SetFormatter(&log.TextFormatter{FullTimestamp: true, DisableSorting: true}) log.SetFormatter(&log.TextFormatter{FullTimestamp: true, DisableSorting: true})
} }
log.Debugf("Global configuration loaded %s", spew.Sdump(globalConfiguration)) log.Debugf("Global configuration loaded %+v", globalConfiguration)
configurationRouter = LoadDefaultConfig(globalConfiguration) configurationRouter = LoadDefaultConfig(globalConfiguration)
// listen new configurations from providers // listen new configurations from providers
@ -97,7 +96,6 @@ func main() {
for { for {
configMsg := <-configurationChan configMsg := <-configurationChan
log.Infof("Configuration receveived from provider %s: %#v", configMsg.providerName, configMsg.configuration) log.Infof("Configuration receveived from provider %s: %#v", configMsg.providerName, configMsg.configuration)
log.Debugf("Configuration %s", spew.Sdump(configMsg.configuration))
if configMsg.configuration == nil { if configMsg.configuration == nil {
log.Info("Skipping empty configuration") log.Info("Skipping empty configuration")
} else if reflect.DeepEqual(currentConfigurations[configMsg.providerName], configMsg.configuration) { } else if reflect.DeepEqual(currentConfigurations[configMsg.providerName], configMsg.configuration) {
@ -191,7 +189,6 @@ func main() {
func startServer(srv *manners.GracefulServer, globalConfiguration *GlobalConfiguration) { func startServer(srv *manners.GracefulServer, globalConfiguration *GlobalConfiguration) {
log.Info("Starting server") log.Info("Starting server")
log.Debugf("Server %s", spew.Sdump(srv))
if len(globalConfiguration.CertFile) > 0 && len(globalConfiguration.KeyFile) > 0 { if len(globalConfiguration.CertFile) > 0 && len(globalConfiguration.KeyFile) > 0 {
err := srv.ListenAndServeTLS(globalConfiguration.CertFile, globalConfiguration.KeyFile) err := srv.ListenAndServeTLS(globalConfiguration.CertFile, globalConfiguration.KeyFile)
if err != nil { if err != nil {