This commit is contained in:
shoopea 2020-06-14 16:30:29 +02:00
parent 2292bbc976
commit 077ac8d73b
1 changed files with 2 additions and 2 deletions

4
log.go
View File

@ -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)