From 33dfeae9a8d319888dd8a35740e32a19b19ebc25 Mon Sep 17 00:00:00 2001 From: chaosinthecrd Date: Fri, 15 Dec 2023 13:12:45 +0000 Subject: [PATCH] warning logs and debug logs werent printing after error check - fixing it Signed-off-by: chaosinthecrd --- log/log.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/log/log.go b/log/log.go index 14d54256..31396dc1 100644 --- a/log/log.go +++ b/log/log.go @@ -58,8 +58,11 @@ func Warnf(format string, args ...interface{}) { if _, ok := a.(error); ok { err := fmt.Errorf(format, args...) log.Warn(err) + return } } + + log.Warnf(format, args...) } func Warn(args ...interface{}) { @@ -71,8 +74,11 @@ func Debugf(format string, args ...interface{}) { if _, ok := a.(error); ok { err := fmt.Errorf(format, args...) log.Debug(err) + return } } + + log.Debugf(format, args...) } func Debug(args ...interface{}) {