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 #141 from msau42/release-0.4
Browse files Browse the repository at this point in the history
Cherry pick #139 to release-0.4: Use protosanitizer library to log rpcs
  • Loading branch information
saad-ali authored Jan 15, 2019
2 parents 2765a86 + 24b8745 commit 715fef9
Show file tree
Hide file tree
Showing 23 changed files with 19,062 additions and 162 deletions.
194 changes: 35 additions & 159 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 @@ -88,3 +88,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"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

REGISTRY_NAME=quay.io/k8scsi
IMAGE_NAME=hostpathplugin
IMAGE_VERSION=v0.4.1
IMAGE_VERSION=v0.4-canary
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
REV=$(shell git describe --long --tags --dirty)

Expand Down
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/v0"
"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.StripSecretsCSI03(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.StripSecretsCSI03(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 715fef9

Please sign in to comment.