Improve logs

This commit is contained in:
Manuel de Brito Fontes 2017-08-29 16:40:03 -03:00
parent 35f6255755
commit e65d3c7571
3 changed files with 17 additions and 12 deletions

View file

@ -85,11 +85,12 @@ func newNGINXController() *NGINXController {
}
n := &NGINXController{
binary: ngx,
configmap: &api_v1.ConfigMap{},
isIPV6Enabled: isIPv6Enabled(),
resolver: h,
ports: &config.ListenPorts{},
binary: ngx,
configmap: &api_v1.ConfigMap{},
isIPV6Enabled: isIPv6Enabled(),
resolver: h,
ports: &config.ListenPorts{},
backendDefaults: config.NewDefault().Backend,
}
fcgiListener, err := net.Listen("unix", fastCGISocket)

View file

@ -601,18 +601,17 @@ type ingressInformation struct {
func getIngressInformation(i, p interface{}) *ingressInformation {
ing, ok := i.(*extensions.Ingress)
if !ok {
glog.Errorf("expected an Ingress type but %T was returned", i)
glog.V(3).Infof("expected an Ingress type but %T was returned", i)
return &ingressInformation{}
}
path, ok := p.(string)
if !ok {
glog.Errorf("expected a string type but %T was returned", p)
glog.V(3).Infof("expected a string type but %T was returned", p)
return &ingressInformation{}
}
if ing == nil {
glog.Errorf("expected an Ingress")
return &ingressInformation{}
}