Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js Winston logging - exitOnError

I'm a little confused on what exactly this means. There is an "explanation" on the github page for Winston, that says you can exit, or not exit. Does that mean that the Winston object dies or stays, or that the node.js process dies or stays? Or something else entirely? I can't find any decent explanations.

like image 939
CargoMeister Avatar asked Feb 14 '15 00:02

CargoMeister


1 Answers

By default, node.js will terminate on uncaught errors. Winston can catch and log these errors.

If exitOnError is true (the default), Winston will subsequently end the node process, just like node's default behavior. If exitOnError is set to false, the error will be logged and the process will continue.

like image 87
weiyin Avatar answered Oct 14 '22 01:10

weiyin