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

Log messages just before exit are not always written #3

Open
benatwork99 opened this issue Nov 19, 2014 · 1 comment
Open

Log messages just before exit are not always written #3

benatwork99 opened this issue Nov 19, 2014 · 1 comment
Assignees
Labels

Comments

@benatwork99
Copy link
Contributor

If we call a winston log method just before process.exit the log message is not always written to the file.

There is an open issue on Winston for this:
winstonjs/winston#228

And it seems to come back to node.js file writing and Winston being an asynchronous logger.

The callback method does not work reliably for us (as noted in the issue). Adding a small delay before the process.exit does seem to work but feels hacky.

@benatwork99 benatwork99 self-assigned this Nov 19, 2014
@benatwork99
Copy link
Contributor Author

Worked around this temporarily by adding a small delay before exit to allow logger to write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant