Skip to content

Commit

Permalink
call done function when logger is disabled (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-canya committed Jan 4, 2022
1 parent c0c2e11 commit 3efdd82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions log.go
Expand Up @@ -428,6 +428,9 @@ func (l Logger) Write(p []byte) (n int, err error) {
func (l *Logger) newEvent(level Level, done func(string)) *Event {
enabled := l.should(level)
if !enabled {
if done != nil {
done("")
}
return nil
}
e := newEvent(l.w, level)
Expand Down

0 comments on commit 3efdd82

Please sign in to comment.