Skip to content

Commit

Permalink
Zero Logger behaves like Nop logger. (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar committed Oct 21, 2023
1 parent 507a426 commit c4046fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ func (l *Logger) newEvent(level Level, done func(string)) *Event {

// should returns true if the log event should be logged.
func (l *Logger) should(lvl Level) bool {
if l.w == nil {
return false
}
if lvl < l.level || lvl < GlobalLevel() {
return false
}
Expand Down

0 comments on commit c4046fe

Please sign in to comment.