Browse Source

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

Update dependency for Graylog2/go-gelf
Vincent Demeester 8 năm trước cách đây
mục cha
commit
0daff908a8
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 1 1
      vendor.conf
  2. 3 3
      vendor/github.com/Graylog2/go-gelf/gelf/writer.go

+ 1 - 1
vendor.conf

@@ -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

+ 3 - 3
vendor/github.com/Graylog2/go-gelf/gelf/writer.go

@@ -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)