Skip to content
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

Doesn't work with buffered logging when multiple JSONs could be put into on chunk separated by newline #54

Open
2 tasks done
mifopen opened this issue Aug 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mifopen
Copy link

mifopen commented Aug 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Code Sandbox link

No response

Bug report

I would suggest to convert the library to pino transport using https://github.com/pinojs/pino-abstract-transport. Now it is very easy to crash a lambda after `JSON.parse` in the destination.ts is trying to parse a chunk containing smth like

{...}\n{...}
@mifopen mifopen added the bug Something isn't working label Aug 6, 2024
@carbonrobot
Copy link
Collaborator

@mifopen Thanks for the issue report, do you have a cope example we can build a test around?

We built this solution in collaboration with the Pino maintainers, but its been a couple years so I can circle back and see if this is still the preferred method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants