@@ -23,9 +23,9 @@ import (
23
23
"strings"
24
24
"time"
25
25
26
- "github.com/golang/glog"
27
26
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
28
27
"google.golang.org/grpc"
28
+ "k8s.io/klog"
29
29
)
30
30
31
31
const (
@@ -102,7 +102,7 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
102
102
if haveConnected && ! lostConnection {
103
103
// We have detected a loss of connection for the first time. Decide what to do...
104
104
// 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 )
106
106
// Inform caller and let it decide? Default is to reconnect.
107
107
if o .reconnect != nil {
108
108
reconnect = o .reconnect ()
@@ -124,7 +124,7 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
124
124
return nil , errors .New ("OnConnectionLoss callback only supported for unix:// addresses" )
125
125
}
126
126
127
- glog .Infof ("Connecting to %s" , address )
127
+ klog .Infof ("Connecting to %s" , address )
128
128
129
129
// Connect in background.
130
130
var conn * grpc.ClientConn
@@ -143,7 +143,7 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
143
143
for {
144
144
select {
145
145
case <- ticker .C :
146
- glog .Warningf ("Still connecting to %s" , address )
146
+ klog .Warningf ("Still connecting to %s" , address )
147
147
148
148
case <- ready :
149
149
return conn , err
@@ -153,10 +153,10 @@ func connect(address string, dialOptions []grpc.DialOption, connectOptions []Opt
153
153
154
154
// LogGRPC is gPRC unary interceptor for logging of CSI messages at level 5. It removes any secrets from the message.
155
155
func 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 ))
158
158
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 )
161
161
return err
162
162
}
0 commit comments