-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I'm in the process of testing out log4js-node as a replacement for bunyan, and checking that the gelf transport works as expected.
I'm using gelf to send data to logstash. It's working for the most part, except that short_message doesn't appear in kibana. If I change the code to use _short_message instead, it works as expected. I've tried several different layouts - currently testing with dummy, but I've tested basic and the default.
My apender looks like this:
gelf: {type: '@log4js-node/gelf', host: 'xxx', port: 12201, facility: 'log-test', layout: {type: 'dummy'}, customFields: {_foo: 'bar'}}
This is really weird. The facility property gets sent correctly, timestamp, host, level etc all work.
According to the logstash docs short_message is expected, and it works with the existing bunyan setup.
I can't see any important difference between the code in this repo vs the gelf-stream package used for bunyan.
I also checked gelf-stream's dep gelfling and it's not adding the _.
I am still looking for configuration issues that could be causing this, but I'm pretty confused because the messages are being sent to a different index but the same server, with all the same config as the working bunyan version.
Any ideas?