Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #140 from msau42/release-1.0
Browse files Browse the repository at this point in the history
Cherry pick #139 to release-1.0: Use protosanitizer library to log rpcs
  • Loading branch information
k8s-ci-robot authored Jan 15, 2019
2 parents b776760 + 3bd2f80 commit 8a4ae6f
Show file tree
Hide file tree
Showing 22 changed files with 19,058 additions and 150 deletions.
180 changes: 32 additions & 148 deletions Gopkg.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@
[[override]]
name = "gopkg.in/square/go-jose.v2"
version = "2.1.7"

[[constraint]]
name = "github.com/kubernetes-csi/csi-lib-utils"
version = "0.2.0"
5 changes: 3 additions & 2 deletions pkg/csi-common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/golang/glog"
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
Expand Down Expand Up @@ -94,12 +95,12 @@ func RunControllerandNodePublishServer(endpoint string, d *CSIDriver, cs csi.Con

func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
glog.V(3).Infof("GRPC call: %s", info.FullMethod)
glog.V(5).Infof("GRPC request: %+v", req)
glog.V(5).Infof("GRPC request: %s", protosanitizer.StripSecrets(req))
resp, err := handler(ctx, req)
if err != nil {
glog.Errorf("GRPC error: %v", err)
} else {
glog.V(5).Infof("GRPC response: %+v", resp)
glog.V(5).Infof("GRPC response: %s", protosanitizer.StripSecrets(resp))
}
return resp, err
}
31 changes: 31 additions & 0 deletions vendor/github.com/kubernetes-csi/csi-lib-utils/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

149 changes: 149 additions & 0 deletions vendor/github.com/kubernetes-csi/csi-lib-utils/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions vendor/github.com/kubernetes-csi/csi-lib-utils/Gopkg.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8a4ae6f

Please sign in to comment.