Skip to content

Commit

Permalink
Merge pull request #1 from terwey/patch-1
Browse files Browse the repository at this point in the history
Fix writer when not using compression
  • Loading branch information
snovichkov authored Aug 24, 2021
2 parents 549c4d7 + ab7d3bc commit be14d7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gelf.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type (

// implement io.WriteCloser.
writeCloser struct {
bytes.Buffer
*bytes.Buffer
}

// implement zapcore.Core.
Expand Down Expand Up @@ -291,7 +291,7 @@ func (w *writer) Write(buf []byte) (n int, err error) {

switch w.compressionType {
case CompressionNone:
cw = &writeCloser{cBuf}
cw = &writeCloser{&cBuf}
case CompressionGzip:
cw, err = gzip.NewWriterLevel(&cBuf, w.compressionLevel)
case CompressionZlib:
Expand Down

0 comments on commit be14d7f

Please sign in to comment.