package util

import (
	"github.com/fatih/color"
	klogv2 "k8s.io/klog/v2"
)

// LogDebugf needs to set the flag -v=1 to show debug logs
func LogDebugf(format string, a ...interface{}) {
	klogv2.V(1).Infof(format, a...)
}

// LogInfof shows the info logs
func LogInfof(format string, a ...interface{}) {
	klogv2.Infof(format, a...)
}

// LogErrorf shows the error logs
func LogErrorf(format string, a ...interface{}) {
	klogv2.Error(color.New(color.FgRed).Sprintf(format, a...))
}

// LogWarningf shows the warning logs
func LogWarningf(format string, a ...interface{}) {
	klogv2.Warning(color.New(color.FgMagenta).Sprintf(format, a...))
}
