Skip to content

Commit

Permalink
call done function when logger is disabled (rs#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-canya authored and pablitoc committed Apr 7, 2023
1 parent 1d1b6e4 commit 82da8a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions log.go
Expand Up @@ -430,6 +430,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 82da8a1

Please sign in to comment.