From a882c1194bbbb79c96992844725e33ce5aa94415 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 11 Aug 2020 17:55:49 +0530 Subject: [PATCH] cephfs: replace Errorf with ErrorLog in createVolume replace Errorf with ErrorLog in createVolume for context based logging. Signed-off-by: Madhu Rajanna --- internal/cephfs/volume.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cephfs/volume.go b/internal/cephfs/volume.go index 091e0ce9c..355d5d18c 100644 --- a/internal/cephfs/volume.go +++ b/internal/cephfs/volume.go @@ -146,7 +146,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Crede "-n", cephEntityClientPrefix+cr.ID, "--keyfile="+cr.KeyFile) if err != nil { - klog.Errorf(util.Log(ctx, "failed to create subvolume group %s, for the vol %s(%s)"), volOptions.SubvolumeGroup, string(volID), err) + util.ErrorLog(ctx, "failed to create subvolume group %s, for the vol %s(%s)", volOptions.SubvolumeGroup, string(volID), err) return err } util.DebugLog(ctx, "cephfs: created subvolume group %s", volOptions.SubvolumeGroup) @@ -178,7 +178,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Crede "ceph", args[:]...) if err != nil { - klog.Errorf(util.Log(ctx, "failed to create subvolume %s(%s) in fs %s"), string(volID), err, volOptions.FsName) + util.ErrorLog(ctx, "failed to create subvolume %s(%s) in fs %s", string(volID), err, volOptions.FsName) return err }