Merge pull request #30780 from xulike666/update-vender-for-go-gelf

Update dependency for Graylog2/go-gelf
This commit is contained in:
Vincent Demeester 2017-02-07 21:40:08 +01:00 committed by GitHub
commit 0daff908a8
2 changed files with 4 additions and 4 deletions

View file

@ -69,7 +69,7 @@ github.com/syndtr/gocapability 2c00daeb6c3b45114c80ac44119e7b8801fdd852
github.com/golang/protobuf 8ee79997227bf9b34611aee7946ae64735e6fd93
# gelf logging driver deps
github.com/Graylog2/go-gelf aab2f594e4585d43468ac57287b0dece9d806883
github.com/Graylog2/go-gelf 7029da823dad4ef3a876df61065156acb703b2ea
github.com/fluent/fluent-logger-golang v1.2.1
# fluent-logger-golang deps

View file

@ -117,8 +117,8 @@ func NewWriter(addr string) (*Writer, error) {
}
// writes the gzip compressed byte array to the connection as a series
// of GELF chunked messages. The header format is documented at
// https://github.com/Graylog2/graylog2-docs/wiki/GELF as:
// of GELF chunked messages. The format is documented at
// http://docs.graylog.org/en/2.1/pages/gelf.html as:
//
// 2-byte magic (0x1e 0x0f), 8 byte id, 1 byte sequence id, 1 byte
// total, chunk-data
@ -126,7 +126,7 @@ func (w *Writer) writeChunked(zBytes []byte) (err error) {
b := make([]byte, 0, ChunkSize)
buf := bytes.NewBuffer(b)
nChunksI := numChunks(zBytes)
if nChunksI > 255 {
if nChunksI > 128 {
return fmt.Errorf("msg too large, would need %d chunks", nChunksI)
}
nChunks := uint8(nChunksI)