documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Misleading example in the GELF specification

Open jedisct1 opened this issue 8 years ago • 1 comments

The GELF specification includes a sample JSON string that can be reduced to:

{
  "full_message": "Backtrace here\n\nmore stuff"
}

leading people to think that this is equivalent to:

{
  "full_message": "Backtrace here

more stuff"
}

And that Graylog violates the JSON specification by encouraging straight \n characters within values.

Reference: https://github.com/jedisct1/flowgger/issues/10

Maybe the GELF specification should emphasize the fact that GELF messages are always valid JSON strings, with the same set of characters having to be escaped.

jedisct1 avatar Aug 09 '16 20:08 jedisct1

@jedisct1 Thank you for the suggestion. Great idea. We are adding a note to this page clarifying that the GELF payload must be valid JSON including only newlines with the appropriate escape sequence.

screen shot 2018-09-20 at 12 09 54 pm

danotorrey avatar Sep 20 '18 17:09 danotorrey