Skip to content

Commit

Permalink
fix: default to nullbyte delimiter for GELF vectordotdev#18008 (vecto…
Browse files Browse the repository at this point in the history
…rdotdev#18419)

* default to nullbyte delimiter for GELF

* Comment/Link to graylog issue regarding null-byte delimiter

* non-doc comment

* remove trailing spaces
  • Loading branch information
MartinEmrich authored Aug 31, 2023
1 parent e9feabd commit a112704
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/codecs/encoding/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ impl EncodingConfigWithFraming {
(None, Serializer::Avro(_) | Serializer::Native(_)) => {
LengthDelimitedEncoder::new().into()
}
(None, Serializer::Gelf(_)) => {
// Graylog/GELF always uses null byte delimiter on TCP, see
// https://github.com/Graylog2/graylog2-server/issues/1240
CharacterDelimitedEncoder::new(0).into()
}
(
None,
Serializer::Csv(_)
| Serializer::Gelf(_)
| Serializer::Logfmt(_)
| Serializer::NativeJson(_)
| Serializer::RawMessage(_)
Expand Down

0 comments on commit a112704

Please sign in to comment.