bunyan-elasticsearch
bunyan-elasticsearch copied to clipboard
Get rid of JSON.parse
If you do this:
var logger = bunyan.createLogger({
name: "My Application",
streams: [
{ stream: process.stdout },
{ stream: esStream, type: 'raw' }
],
serializers: bunyan.stdSerializers
});
Then bunyan will send you raw JSON objects instead of sending you strings, so you won't have to call JSON.parse() on the log entry that Bunyan just JSON.stringified().