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

flush & flushSync stdout on Node core streams #458

Closed
ronag opened this issue Jul 24, 2018 · 6 comments
Closed

flush & flushSync stdout on Node core streams #458

ronag opened this issue Jul 24, 2018 · 6 comments
Labels

Comments

@ronag
Copy link

ronag commented Jul 24, 2018

Even in non extreme mode logs are not properly flushed during process.exit. See, nodejs/node#6456

No sure how to resolve this? Should we send a cb to every write call to keep a isFlushed flag up to date?

@davidmarkclements
Copy link
Member

is this relevant to the v5 release and the sonic-boom approach (cc @mcollina)

@ronag
Copy link
Author

ronag commented Jul 24, 2018

The sonic-boom approach does it correctly. This is more of a problem with the non extreme/sonic-boom approach. We don't have a way to flush stdout.

@davidmarkclements
Copy link
Member

yeah that's a node core issue - so it's a wont-fix for us - we recommend using pino.destination in the v5 docs and v5 use pino.destination(1) by default to supply stdout flushing

@davidmarkclements davidmarkclements changed the title flush & flushSync stdout flush & flushSync stdout on Node core streams Jul 24, 2018
@ronag
Copy link
Author

ronag commented Jul 24, 2018

@davidmarkclements Fair enough. Though we might want to emphasize this in the docs?

@davidmarkclements
Copy link
Member

absolutely - feel welcome to PR against next-major docs

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants