From f566b0fc2db7ceeba654fd869087ebc2136c8e06 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 11 Aug 2020 17:59:51 +0530 Subject: [PATCH] cephfs: replace Warningf with WarningLog in unmountVolume replace Errorf with ErrorLog in unmountVolume for context based logging. Signed-off-by: Madhu Rajanna --- internal/cephfs/volumemounter.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/cephfs/volumemounter.go b/internal/cephfs/volumemounter.go index 543e2b953..ee5e41732 100644 --- a/internal/cephfs/volumemounter.go +++ b/internal/cephfs/volumemounter.go @@ -28,8 +28,6 @@ import ( "sync" "github.com/ceph/ceph-csi/internal/util" - - klog "k8s.io/klog/v2" ) const ( @@ -276,10 +274,10 @@ func unmountVolume(ctx context.Context, mountPoint string) error { if ok { p, err := os.FindProcess(pid) if err != nil { - klog.Warningf(util.Log(ctx, "failed to find process %d: %v"), pid, err) + util.WarningLog(ctx, "failed to find process %d: %v", pid, err) } else { if _, err = p.Wait(); err != nil { - klog.Warningf(util.Log(ctx, "%d is not a child process: %v"), pid, err) + util.WarningLog(ctx, "%d is not a child process: %v", pid, err) } } }