We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4347fba commit ab0bfd9Copy full SHA for ab0bfd9
log/log.go
@@ -38,7 +38,7 @@ type (
38
)
39
40
const (
41
- DEBUG uint32 = iota + 1
+ DEBUG Lvl = iota + 1
42
INFO
43
WARN
44
ERROR
@@ -59,7 +59,7 @@ func init() {
59
60
func New(prefix string) (l *Logger) {
61
l = &Logger{
62
- level: INFO,
+ level: uint32(INFO),
63
skip: 2,
64
prefix: prefix,
65
template: l.newTemplate(defaultHeader),
@@ -348,8 +348,8 @@ func Panicj(j JSON) {
348
global.Panicj(j)
349
}
350
351
-func (l *Logger) log(level uint32, format string, args ...interface{}) {
352
- if level >= l.level || level == 0 {
+func (l *Logger) log(level Lvl, format string, args ...interface{}) {
+ if level >= l.Level() || level == 0 {
353
buf := l.bufferPool.Get().(*bytes.Buffer)
354
buf.Reset()
355
defer l.bufferPool.Put(buf)
0 commit comments