Open benatwork99 opened 9 years ago
If we call a winston log method just before process.exit the log message is not always written to the file.
process.exit
There is an open issue on Winston for this: https://github.com/flatiron/winston/issues/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.
Worked around this temporarily by adding a small delay before exit to allow logger to write
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: https://github.com/flatiron/winston/issues/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.