From 44fa698eb01c2826fe410640aebc2c30084728cb Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 30 Nov 2018 13:49:11 -0800 Subject: [PATCH] use protosanitizer --- pkg/connection/connection.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/connection/connection.go b/pkg/connection/connection.go index b3472f7fe..2a76acdfb 100644 --- a/pkg/connection/connection.go +++ b/pkg/connection/connection.go @@ -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/codes" "google.golang.org/grpc/connectivity" @@ -134,9 +135,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.V(5).Infof("GRPC call: %s", method) - glog.V(5).Infof("GRPC request: %+v", req) + glog.V(5).Infof("GRPC request: %s", protosanitizer.StripSecrets(req)) err := invoker(ctx, method, req, reply, cc, opts...) - glog.V(5).Infof("GRPC response: %+v", reply) + glog.V(5).Infof("GRPC response: %s", protosanitizer.StripSecrets(reply)) glog.V(5).Infof("GRPC error: %v", err) return err }