pinojs / pino-elasticsearch

🌲 load pino logs into Elasticsearch
MIT License
179 stars 67 forks source link

Fix usage of steam, added logging of json errors #88

Closed kammerjaeger closed 3 years ago

kammerjaeger commented 3 years ago

Hi, Please have a look at the change, currently the wrong stream is used so no errors are shown. I also added a json error output.

Let me know what you think. It would also be nice to have a command line option to forward the input to stdout without a script or code around it.

kammerjaeger commented 3 years ago

According to documentation (and looking into the source code): "Event received by pino-elasticsearch is unparseable (via JSON.parse)" I fixed and added the line in the error message.

kammerjaeger commented 3 years ago

Looks like the ';' is not liked by the linter, I will remove them.