cephfs: replace Errorf with ErrorLog in getSnapshotInfo

replace Errorf with ErrorLog in getSnapshotInfo
for context based logging.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna 2020-08-11 17:48:01 +05:30 committed by mergify[bot]
parent 7e8cc41aca
commit 72dfe6a265

View File

@ -131,7 +131,7 @@ func getSnapshotInfo(ctx context.Context, volOptions *volumeOptions, cr *util.Cr
if strings.Contains(err.Error(), ErrSnapNotFound.Error()) { if strings.Contains(err.Error(), ErrSnapNotFound.Error()) {
return snapshotInfo{}, err return snapshotInfo{}, err
} }
klog.Errorf(util.Log(ctx, "failed to get subvolume snapshot info %s %s(%s) in fs %s"), string(snapID), string(volID), err, volOptions.FsName) util.ErrorLog(ctx, "failed to get subvolume snapshot info %s %s(%s) in fs %s", string(snapID), string(volID), err, volOptions.FsName)
return snapshotInfo{}, err return snapshotInfo{}, err
} }
return snap, nil return snap, nil