4
4
"fmt"
5
5
"reflect"
6
6
7
- "github.com/golang/glog"
8
7
"github.com/nginxinc/kubernetes-ingress/internal/configs"
8
+ nl "github.com/nginxinc/kubernetes-ingress/internal/logger"
9
9
conf_v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1"
10
10
api_v1 "k8s.io/api/core/v1"
11
11
"k8s.io/apimachinery/pkg/fields"
@@ -16,30 +16,30 @@ func createGlobalConfigurationHandlers(lbc *LoadBalancerController) cache.Resour
16
16
return cache.ResourceEventHandlerFuncs {
17
17
AddFunc : func (obj interface {}) {
18
18
gc := obj .(* conf_v1.GlobalConfiguration )
19
- glog . V ( 3 ). Infof ( "Adding GlobalConfiguration: %v" , gc .Name )
19
+ nl . Debugf ( lbc . logger , "Adding GlobalConfiguration: %v" , gc .Name )
20
20
lbc .AddSyncQueue (gc )
21
21
},
22
22
DeleteFunc : func (obj interface {}) {
23
23
gc , isGc := obj .(* conf_v1.GlobalConfiguration )
24
24
if ! isGc {
25
25
deletedState , ok := obj .(cache.DeletedFinalStateUnknown )
26
26
if ! ok {
27
- glog . V ( 3 ). Infof ( "Error received unexpected object: %v" , obj )
27
+ nl . Debugf ( lbc . logger , "Error received unexpected object: %v" , obj )
28
28
return
29
29
}
30
30
gc , ok = deletedState .Obj .(* conf_v1.GlobalConfiguration )
31
31
if ! ok {
32
- glog . V ( 3 ). Infof ( "Error DeletedFinalStateUnknown contained non-GlobalConfiguration object: %v" , deletedState .Obj )
32
+ nl . Debugf ( lbc . logger , "Error DeletedFinalStateUnknown contained non-GlobalConfiguration object: %v" , deletedState .Obj )
33
33
return
34
34
}
35
35
}
36
- glog . V ( 3 ). Infof ("Removing GlobalConfiguration: %v" , gc .Name )
36
+ lbc . logger . Debug ( fmt . Sprintf ("Removing GlobalConfiguration: %v" , gc .Name ) )
37
37
lbc .AddSyncQueue (gc )
38
38
},
39
39
UpdateFunc : func (old , cur interface {}) {
40
40
curGc := cur .(* conf_v1.GlobalConfiguration )
41
41
if ! reflect .DeepEqual (old , cur ) {
42
- glog . V ( 3 ). Infof ( "GlobalConfiguration %v changed, syncing" , curGc .Name )
42
+ nl . Debugf ( lbc . logger , "GlobalConfiguration %v changed, syncing" , curGc .Name )
43
43
lbc .AddSyncQueue (curGc )
44
44
}
45
45
},
@@ -74,11 +74,11 @@ func (lbc *LoadBalancerController) syncGlobalConfiguration(task task) {
74
74
var validationErr error
75
75
76
76
if ! gcExists {
77
- glog . V ( 2 ). Infof ( "Deleting GlobalConfiguration: %v\n " , key )
77
+ nl . Debugf ( lbc . logger , "Deleting GlobalConfiguration: %v\n " , key )
78
78
79
79
changes , problems = lbc .configuration .DeleteGlobalConfiguration ()
80
80
} else {
81
- glog . V ( 2 ). Infof ( "Adding or Updating GlobalConfiguration: %v\n " , key )
81
+ nl . Debugf ( lbc . logger , "Adding or Updating GlobalConfiguration: %v\n " , key )
82
82
83
83
gc := obj .(* conf_v1.GlobalConfiguration )
84
84
changes , problems , validationErr = lbc .configuration .AddOrUpdateGlobalConfiguration (gc )
0 commit comments