From 3fa512617b828935fd3d7f03fac7912172387dd8 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 11 Aug 2020 17:17:49 +0530 Subject: [PATCH] cephfs: replace Errorf with util.ErrorLog in cleanupClone replace Errorf with util.ErrorLog in cleanupCloneFromSubvolumeSnapshot for context based logging. Signed-off-by: Madhu Rajanna --- internal/cephfs/clone.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cephfs/clone.go b/internal/cephfs/clone.go index c94cec97f..0488502db 100644 --- a/internal/cephfs/clone.go +++ b/internal/cephfs/clone.go @@ -140,13 +140,13 @@ func cleanupCloneFromSubvolumeSnapshot(ctx context.Context, volID, cloneID volum if snapInfo.Protected == snapshotIsProtected { err = unprotectSnapshot(ctx, parentVolOpt, cr, snapShotID, volID) if err != nil { - klog.Errorf(util.Log(ctx, "failed to unprotect snapshot %s %v"), snapShotID, err) + util.ErrorLog(ctx, "failed to unprotect snapshot %s %v", snapShotID, err) return err } } err = deleteSnapshot(ctx, parentVolOpt, cr, snapShotID, volID) if err != nil { - klog.Errorf(util.Log(ctx, "failed to delete snapshot %s %v"), snapShotID, err) + util.ErrorLog(ctx, "failed to delete snapshot %s %v", snapShotID, err) return err } return nil