cleanup: Avoid usage of numbers

Add seperate functions to handle all
levels and types of logging.

Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
Yug
2020-07-09 20:18:24 +05:30
committed by mergify[bot]
parent 8dc4ab6b1b
commit 1490daed7e
26 changed files with 186 additions and 114 deletions

View File

@ -116,7 +116,7 @@ func createVolume(ctx context.Context, volOptions *volumeOptions, cr *util.Crede
klog.Errorf(util.Log(ctx, "failed to create subvolume group %s, for the vol %s(%s)"), volOptions.SubvolumeGroup, string(volID), err)
return err
}
klog.V(4).Infof(util.Log(ctx, "cephfs: created subvolume group %s"), volOptions.SubvolumeGroup)
util.DebugLog(ctx, "cephfs: created subvolume group %s", volOptions.SubvolumeGroup)
clusterAdditionalInfo[volOptions.ClusterID].subVolumeGroupCreated = true
}
@ -253,7 +253,7 @@ func purgeVolumeDeprecated(ctx context.Context, volID volumeID, adminCr *util.Cr
}
} else {
if !pathExists(volRootDeleting) {
klog.V(4).Infof(util.Log(ctx, "cephfs: volume %s not found, assuming it to be already deleted"), volID)
util.DebugLog(ctx, "cephfs: volume %s not found, assuming it to be already deleted", volID)
return nil
}
}