documentation
documentation copied to clipboard
Misleading example in the GELF specification
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 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.