Skip to content

Commit

Permalink
use protosanitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
msau42 committed Nov 30, 2018
1 parent 9c44c8e commit 3fb43ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/connection/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/golang/glog"
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
"google.golang.org/grpc"
"google.golang.org/grpc/connectivity"
)
Expand Down Expand Up @@ -129,9 +130,9 @@ func (c *csiConnection) Close() error {

func logGRPC(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
glog.Infof("GRPC call: %s", method)
glog.Infof("GRPC request: %+v", req)
glog.Infof("GRPC request: %s", protosanitizer.StripSecrets(req))
err := invoker(ctx, method, req, reply, cc, opts...)
glog.Infof("GRPC response: %+v", reply)
glog.Infof("GRPC response: %s", protosanitizer.StripSecrets(reply))
glog.Infof("GRPC error: %v", err)
return err
}

0 comments on commit 3fb43ef

Please sign in to comment.