fix log level helper (#1342)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
fbde872e7f
commit
3543b275e0
@ -1,6 +1,8 @@
|
||||
package logger
|
||||
|
||||
import "os"
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
type Helper struct {
|
||||
Logger
|
||||
|
@ -116,11 +116,11 @@ func Fatalf(template string, args ...interface{}) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Returns true if the given level is at or above the current logger level
|
||||
// Returns true if the given level is at or lower the current logger level
|
||||
func V(lvl Level, log Logger) bool {
|
||||
l := DefaultLogger
|
||||
if log != nil {
|
||||
l = log
|
||||
}
|
||||
return l.Options().Level >= lvl
|
||||
return l.Options().Level <= lvl
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user