-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
writing to elastic isnt working #41
Comments
You should use https://github.com/pinojs/pino-multi-stream to print to stdout as well. As for the reason logs are not popping up in Elastic... I don't know. cc @delvedor |
thanks i will check |
@eran10, you had any development regarding this issue? |
I can share an update, we have worked for improving the ECS support, and if you are using Pio v6 now you can use @elastic/ecs-pino-format instead of enabling the ecs options here. |
I found if I write more logs, it sends some of the logs. If I set flushBytes to 10, all logs appears. This might be an issue that the last few logs can not be flushed before node.js app terminated. |
This is the correct behavior :) By default we collect 5 MB of logs before sending them, to avoid overloading Elasticsearch. You can easily change that limit with the
It should not, as soon as the process end, the bulk indexer does a final flush. Anyhow in the next version of the bulk indexer, there will be a flush timeout option as well :) |
I didn't see this behavior. |
If you run the main process and pipe this transport, it works automatically, as the stream from the main process and the transport ends.
If you pass this library directly to the pino options, and then kill the process, there is no guarantee that all the logs will be sent, as the process will be destroyed. |
Hi, i would like to send my pino logs to elastic, we are using elastic 6 version with latest version of pino and pino-elastic and when i config the below for pino :
and then
the app is running ok, but no logs is printed to console and no logs sent to elastic with no errors at all,
am i missing something?
The text was updated successfully, but these errors were encountered: