Skip to content

Commit

Permalink
Merge pull request #19 from gokit/influx6-patch-1
Browse files Browse the repository at this point in the history
Add defer release of encoder
  • Loading branch information
francoispqt authored Dec 27, 2018
2 parents d1c4e8e + 9ad77d1 commit 65e47b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ func (l *Logger) finalizeIfContext(entry Entry) {

// create a new encoder for the final output.
entryEnc := gojay.BorrowEncoder(l.w)
defer entryEnc.Release()

entry.enc = entryEnc

// create dummy entry for applying hooks.
Expand Down

0 comments on commit 65e47b1

Please sign in to comment.