Skip to content

Commit

Permalink
no write if level higher then current level
Browse files Browse the repository at this point in the history
  • Loading branch information
semihalev committed May 13, 2020
1 parent d34e783 commit 7f20b48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ type logger struct {
}

func (l *logger) write(msg string, lvl Lvl, ctx []interface{}) {
if l.lvl < lvl {
return
}

r := &Record{
Time: time.Now(),
Lvl: lvl,
Expand Down

0 comments on commit 7f20b48

Please sign in to comment.