*: fix logrus.Warn[f]

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2016-06-11 19:42:38 +02:00
parent b33348682f
commit 3f69598101

View file

@ -75,7 +75,7 @@ func checkCgroupMem(cgMounts map[string]string, quiet bool) cgroupMemInfo {
mountPoint, ok := cgMounts["memory"] mountPoint, ok := cgMounts["memory"]
if !ok { if !ok {
if !quiet { if !quiet {
logrus.Warnf("Your kernel does not support cgroup memory limit") logrus.Warn("Your kernel does not support cgroup memory limit")
} }
return cgroupMemInfo{} return cgroupMemInfo{}
} }
@ -90,15 +90,15 @@ func checkCgroupMem(cgMounts map[string]string, quiet bool) cgroupMemInfo {
} }
oomKillDisable := cgroupEnabled(mountPoint, "memory.oom_control") oomKillDisable := cgroupEnabled(mountPoint, "memory.oom_control")
if !quiet && !oomKillDisable { if !quiet && !oomKillDisable {
logrus.Warnf("Your kernel does not support oom control.") logrus.Warn("Your kernel does not support oom control.")
} }
memorySwappiness := cgroupEnabled(mountPoint, "memory.swappiness") memorySwappiness := cgroupEnabled(mountPoint, "memory.swappiness")
if !quiet && !memorySwappiness { if !quiet && !memorySwappiness {
logrus.Warnf("Your kernel does not support memory swappiness.") logrus.Warn("Your kernel does not support memory swappiness.")
} }
kernelMemory := cgroupEnabled(mountPoint, "memory.kmem.limit_in_bytes") kernelMemory := cgroupEnabled(mountPoint, "memory.kmem.limit_in_bytes")
if !quiet && !kernelMemory { if !quiet && !kernelMemory {
logrus.Warnf("Your kernel does not support kernel memory limit.") logrus.Warn("Your kernel does not support kernel memory limit.")
} }
return cgroupMemInfo{ return cgroupMemInfo{
@ -116,7 +116,7 @@ func checkCgroupCPU(cgMounts map[string]string, quiet bool) cgroupCPUInfo {
mountPoint, ok := cgMounts["cpu"] mountPoint, ok := cgMounts["cpu"]
if !ok { if !ok {
if !quiet { if !quiet {
logrus.Warnf("Unable to find cpu cgroup in mounts") logrus.Warn("Unable to find cpu cgroup in mounts")
} }
return cgroupCPUInfo{} return cgroupCPUInfo{}
} }
@ -147,7 +147,7 @@ func checkCgroupBlkioInfo(cgMounts map[string]string, quiet bool) cgroupBlkioInf
mountPoint, ok := cgMounts["blkio"] mountPoint, ok := cgMounts["blkio"]
if !ok { if !ok {
if !quiet { if !quiet {
logrus.Warnf("Unable to find blkio cgroup in mounts") logrus.Warn("Unable to find blkio cgroup in mounts")
} }
return cgroupBlkioInfo{} return cgroupBlkioInfo{}
} }
@ -195,7 +195,7 @@ func checkCgroupCpusetInfo(cgMounts map[string]string, quiet bool) cgroupCpusetI
mountPoint, ok := cgMounts["cpuset"] mountPoint, ok := cgMounts["cpuset"]
if !ok { if !ok {
if !quiet { if !quiet {
logrus.Warnf("Unable to find cpuset cgroup in mounts") logrus.Warn("Unable to find cpuset cgroup in mounts")
} }
return cgroupCpusetInfo{} return cgroupCpusetInfo{}
} }