wavded/graygelf

additional fields passed should be used as actual gelf fields

Closed this issue · 1 comments

Currently, the JSON string of the additional fields is merely used as the full log message.

So:

log.error('short message', { foo: 'bar' })

should write the following gelf

{
...
"short_message": "short message",
"foo": "bar"
...
}

not

{
...
"short_message": "short message",
"full_message": "{ \"foo\": \"bar\" }"
...
}

Or am I missing something?

Ah, the key must start with an underscore eg _foo. Should've read the spec more carefully!
Sorry about that, closing.