mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
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:
@ -122,8 +122,7 @@ func main() {
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
klog.V(1).Infof("Driver version: %s and Git version: %s", util.DriverVersion, util.GitCommit)
|
||||
util.DefaultLog("Driver version: %s and Git version: %s", util.DriverVersion, util.GitCommit)
|
||||
var cp util.CachePersister
|
||||
|
||||
if conf.Vtype == "" {
|
||||
@ -150,7 +149,7 @@ func main() {
|
||||
if pidErr != nil {
|
||||
klog.Errorf("Failed to get the PID limit, can not reconfigure: %v", pidErr)
|
||||
} else {
|
||||
klog.V(1).Infof("Initial PID limit is set to %d", currentLimit)
|
||||
util.DefaultLog("Initial PID limit is set to %d", currentLimit)
|
||||
err = util.SetPIDLimit(conf.PidLimit)
|
||||
if err != nil {
|
||||
klog.Errorf("Failed to set new PID limit to %d: %v", conf.PidLimit, err)
|
||||
@ -159,7 +158,7 @@ func main() {
|
||||
if conf.PidLimit == -1 {
|
||||
s = " (max)"
|
||||
}
|
||||
klog.V(1).Infof("Reconfigured PID limit to %d%s", conf.PidLimit, s)
|
||||
util.DefaultLog("Reconfigured PID limit to %d%s", conf.PidLimit, s)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -178,7 +177,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
klog.V(1).Infof("Starting driver type: %v with name: %v", conf.Vtype, dname)
|
||||
util.DefaultLog("Starting driver type: %v with name: %v", conf.Vtype, dname)
|
||||
switch conf.Vtype {
|
||||
case rbdType:
|
||||
validateCloneDepthFlag(&conf)
|
||||
|
Reference in New Issue
Block a user