From d1ac832266311ad388322dcaeebef70dba8c0e2c Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 11 Aug 2020 17:52:23 +0530 Subject: [PATCH] cephfs: replace Errorf with ErrorLog in genSnapFromOptions replace Errorf with ErrorLog in genSnapFromOptions for context based logging. Signed-off-by: Madhu Rajanna --- internal/cephfs/util.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/cephfs/util.go b/internal/cephfs/util.go index 99f9c771f..9558b4522 100644 --- a/internal/cephfs/util.go +++ b/internal/cephfs/util.go @@ -29,7 +29,6 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - klog "k8s.io/klog/v2" ) type volumeID string @@ -136,7 +135,7 @@ func genSnapFromOptions(ctx context.Context, req *csi.CreateSnapshotRequest) (sn cephfsSnap.Monitors, cephfsSnap.ClusterID, err = util.GetMonsAndClusterID(snapOptions) if err != nil { - klog.Errorf(util.Log(ctx, "failed getting mons (%s)"), err) + util.ErrorLog(ctx, "failed getting mons (%s)", err) return nil, err } if namePrefix, ok := snapOptions["snapshotNamePrefix"]; ok {