I want to flush the winston logger before process.exit
.
process.on('uncaughtException', function(err){
logger.error('Fatal uncaught exception crashed cluster', err);
logger.flush(function(){ // <-
process.exit(1);
});
});
Is there anything like logger.flush
available? I couldn't find anything about it, other than people complaining about winston not being very actively maintained.
As an alternative, is there any popular (actively maintained) multi-transport logging framework that provides a flushing capability?