@@ -23,9 +23,9 @@ import (
2323 "strings"
2424 "time"
2525
26- "github.com/golang/glog"
2726 "github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
2827 "google.golang.org/grpc"
28+ "k8s.io/klog"
2929)
3030
3131const (
@@ -102,7 +102,7 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
102102 if haveConnected && ! lostConnection {
103103 // We have detected a loss of connection for the first time. Decide what to do...
104104 // Record this once. TODO (?): log at regular time intervals.
105- glog .Errorf ("Lost connection to %s." , address )
105+ klog .Errorf ("Lost connection to %s." , address )
106106 // Inform caller and let it decide? Default is to reconnect.
107107 if o .reconnect != nil {
108108 reconnect = o .reconnect ()
@@ -124,7 +124,7 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
124124 return nil , errors .New ("OnConnectionLoss callback only supported for unix:// addresses" )
125125 }
126126
127- glog .Infof ("Connecting to %s" , address )
127+ klog .Infof ("Connecting to %s" , address )
128128
129129 // Connect in background.
130130 var conn * grpc.ClientConn
@@ -143,7 +143,7 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
143143 for {
144144 select {
145145 case <- ticker .C :
146- glog .Warningf ("Still connecting to %s" , address )
146+ klog .Warningf ("Still connecting to %s" , address )
147147
148148 case <- ready :
149149 return conn , err
@@ -153,10 +153,10 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
153153
154154// LogGRPC is gPRC unary interceptor for logging of CSI messages at level 5. It removes any secrets from the message.
155155func LogGRPC (ctx context.Context , method string , req , reply interface {}, cc * grpc.ClientConn , invoker grpc.UnaryInvoker , opts ... grpc.CallOption ) error {
156- glog .V (5 ).Infof ("GRPC call: %s" , method )
157- glog .V (5 ).Infof ("GRPC request: %s" , protosanitizer .StripSecrets (req ))
156+ klog .V (5 ).Infof ("GRPC call: %s" , method )
157+ klog .V (5 ).Infof ("GRPC request: %s" , protosanitizer .StripSecrets (req ))
158158 err := invoker (ctx , method , req , reply , cc , opts ... )
159- glog .V (5 ).Infof ("GRPC response: %s" , protosanitizer .StripSecrets (reply ))
160- glog .V (5 ).Infof ("GRPC error: %v" , err )
159+ klog .V (5 ).Infof ("GRPC response: %s" , protosanitizer .StripSecrets (reply ))
160+ klog .V (5 ).Infof ("GRPC error: %v" , err )
161161 return err
162162}
0 commit comments