From 9155a07345eb3bc1fc7c5e288640c085c3256200 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 4 Sep 2020 00:19:40 -0700 Subject: [PATCH] add logging --- pkg/driver/mounter.go | 4 ++-- pkg/driver/mounter_seaweedfs.go | 2 +- pkg/driver/nodeserver.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/driver/mounter.go b/pkg/driver/mounter.go index 1eaa24f..3906232 100644 --- a/pkg/driver/mounter.go +++ b/pkg/driver/mounter.go @@ -25,11 +25,11 @@ func newMounter(bucketName string, filer string) (Mounter, error) { func fuseMount(path string, command string, args []string) error { cmd := exec.Command(command, args...) - glog.V(3).Infof("Mounting fuse with command: %s and args: %s", command, args) + glog.V(0).Infof("Mounting fuse with command: %s and args: %s", command, args) out, err := cmd.CombinedOutput() if err != nil { - return fmt.Errorf("Error fuseMount command: %s\nargs: %s\noutput: %s", command, args, out) + return fmt.Errorf("Error fuseMount command: %s\nargs: %s\noutput: %s\nerror: %v", command, args, out, err) } return waitForMount(path, 10*time.Second) diff --git a/pkg/driver/mounter_seaweedfs.go b/pkg/driver/mounter_seaweedfs.go index f907823..5278836 100644 --- a/pkg/driver/mounter_seaweedfs.go +++ b/pkg/driver/mounter_seaweedfs.go @@ -24,7 +24,7 @@ func newSeaweedFsMounter(bucketName string, filer string) (Mounter, error) { } func (seaweedFs *seaweedFsMounter) Mount(target string) error { - glog.V(4).Infof("mounting %s%s to %s", seaweedFs.filerUrl, seaweedFs.bucketName, target) + glog.V(0).Infof("mounting %s%s to %s", seaweedFs.filerUrl, seaweedFs.bucketName, target) args := []string{ "mount", diff --git a/pkg/driver/nodeserver.go b/pkg/driver/nodeserver.go index f17a84b..82e1aed 100644 --- a/pkg/driver/nodeserver.go +++ b/pkg/driver/nodeserver.go @@ -25,7 +25,7 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis // mount the fs here targetPath := req.GetTargetPath() - glog.V(4).Infof("NodePublishVolume volume %s to %s", volumeID, targetPath) + glog.V(0).Infof("NodePublishVolume volume %s to %s", volumeID, targetPath) // Check arguments if req.GetVolumeCapability() == nil { @@ -69,7 +69,7 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis return nil, status.Error(codes.Internal, err.Error()) } - glog.V(4).Infof("volume %s successfully mounted to %s", volumeID, targetPath) + glog.V(0).Infof("volume %s successfully mounted to %s", volumeID, targetPath) return &csi.NodePublishVolumeResponse{}, nil }