Skip to content

Commit

Permalink
Update logging format of the driver (#4)
Browse files Browse the repository at this point in the history
This enables printing actual values inside request instead of address of the value
  • Loading branch information
Cheng Pan committed Jan 2, 2019
1 parent 16d4c47 commit 12fac1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolu
}

func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) {
glog.V(4).Infof("NodePublishVolume: called with args %#v", req)
glog.V(4).Infof("NodePublishVolume: called with args %+v", req)

volumeId := req.GetVolumeId()
source := fmt.Sprintf("%s:/", volumeId)
Expand Down Expand Up @@ -79,7 +79,7 @@ func (d *Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolu
}

func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error) {
glog.V(4).Infof("NodeUnpublishVolume: called with args %#v", req)
glog.V(4).Infof("NodeUnpublishVolume: called with args %+v", req)

target := req.GetTargetPath()
if len(target) == 0 {
Expand All @@ -96,7 +96,7 @@ func (d *Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublish
}

func (d *Driver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error) {
glog.V(4).Infof("NodeGetCapabilities: called with args %#v", req)
glog.V(4).Infof("NodeGetCapabilities: called with args %+v", req)
var caps []*csi.NodeServiceCapability
for _, cap := range nodeCaps {
c := &csi.NodeServiceCapability{
Expand All @@ -112,15 +112,15 @@ func (d *Driver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabi
}

func (d *Driver) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error) {
glog.V(4).Infof("NodeGetInfo: called with args %#v", req)
glog.V(4).Infof("NodeGetInfo: called with args %+v", req)

return &csi.NodeGetInfoResponse{
NodeId: d.nodeID,
}, nil
}

func (d *Driver) NodeGetId(ctx context.Context, req *csi.NodeGetIdRequest) (*csi.NodeGetIdResponse, error) {
glog.V(4).Infof("NodeGetId: called with args %#v", req)
glog.V(4).Infof("NodeGetId: called with args %+v", req)
return &csi.NodeGetIdResponse{
NodeId: d.nodeID,
}, nil
Expand Down

0 comments on commit 12fac1d

Please sign in to comment.