cephfs: replace Errorf with ErrorLog in genSnapFromOptions

replace Errorf with ErrorLog in genSnapFromOptions
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-11 17:52:23 +05:30 committed by mergify[bot]
parent e83a51c1e1
commit d1ac832266

View File

@ -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 {