Skip to content

Commit dc6aea6

Browse files
committed
use protosanitizer library
1 parent 7f0070e commit dc6aea6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/connection/connection.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/golang/glog"
2828
"github.com/golang/protobuf/ptypes"
2929
"github.com/golang/protobuf/ptypes/timestamp"
30+
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
3031
"google.golang.org/grpc"
3132
"google.golang.org/grpc/connectivity"
3233
"k8s.io/api/core/v1"
@@ -267,8 +268,9 @@ func (c *csiConnection) Close() error {
267268

268269
func logGRPC(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
269270
glog.V(5).Infof("GRPC call: %s", method)
271+
glog.V(5).Infof("GRPC request: %s", protosanitizer.StripSecrets(req))
270272
err := invoker(ctx, method, req, reply, cc, opts...)
271-
glog.V(5).Infof("GRPC response: %+v", reply)
273+
glog.V(5).Infof("GRPC response: %s", protosanitizer.StripSecrets(reply))
272274
glog.V(5).Infof("GRPC error: %v", err)
273275
return err
274276
}

0 commit comments

Comments
 (0)