pinojs / pino-elasticsearch

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

Some logs are being lost #33

Closed troy-lamerton closed 5 years ago

troy-lamerton commented 5 years ago

When I do 3 logs in the same function, only the first one is showing in elastic search. I checked the logs.txt output so I know the logs are going into pino-elasticsearch but they're not making it into elasticsearch.

The command that starts the node server:

node ./dist | tee ../logs.txt | pino-elasticsearch --index decoder-%{DATE} --node $ES_HOST

The full command:

env-cmd --no-override --use-shell 'node ./dist | tee ../logs.txt | pino-elasticsearch --index decoder-%{DATE} --node $ES_HOST'

I can consistently reproduce this with certain functions in my code.

mcollina commented 5 years ago

Would you mind uploading a simplified example to reproduce?

troy-lamerton commented 5 years ago

After improvements on the server-side I'm now unable to reproduce this.