mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 06:10:22 +00:00
util: add WarningLog to log with context
added WarningLog to log with context Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
b223924044
commit
3d12456493
@ -76,6 +76,12 @@ func WarningLogMsg(message string, args ...interface{}) {
|
||||
klog.WarningDepth(1, logMessage)
|
||||
}
|
||||
|
||||
// WarningLog helps in logging warnings with context.
|
||||
func WarningLog(ctx context.Context, message string, args ...interface{}) {
|
||||
logMessage := fmt.Sprintf(Log(ctx, message), args...)
|
||||
klog.WarningDepth(1, logMessage)
|
||||
}
|
||||
|
||||
// DefaultLog helps in logging with klog.level 1.
|
||||
func DefaultLog(message string, args ...interface{}) {
|
||||
logMessage := fmt.Sprintf(message, args...)
|
||||
|
Loading…
Reference in New Issue
Block a user