From 077ac8d73be24d83d1405550389c8ed33951e011 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 14 Jun 2020 16:30:29 +0200 Subject: [PATCH] update --- log.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log.go b/log.go index e6e78b4..1c143d7 100644 --- a/log.go +++ b/log.go @@ -22,7 +22,7 @@ func failError(err error, format string, a ...interface{}) { } func logError(err error, lvl uint, format string, a ...interface{}) { - if err != nil && lvl >= cfgTracker.LOG.Level { + if err != nil && lvl >= 0 { _, fn, line, _ := runtime.Caller(2) out := fmt.Sprintf(format, a...) log.Printf("[%s:%d] %s : %s", filepath.Base(fn), line, out, err) @@ -30,7 +30,7 @@ func logError(err error, lvl uint, format string, a ...interface{}) { } func logInfo(lvl uint, format string, a ...interface{}) { - if lvl >= cfgTracker.LOG.Level { + if lvl >= 0 { _, fn, line, _ := runtime.Caller(2) out := fmt.Sprintf(format, a...) log.Printf("[%s:%d] %s", filepath.Base(fn), line, out)