Capture node.js crash reason

Posted by dfilkovi on Stack Overflow See other posts from Stack Overflow or by dfilkovi
Published on 2012-04-12T11:02:38Z Indexed on 2012/04/13 17:30 UTC
Read the original article Hit count: 229

Filed under:

I have a script written in node.js, it uses 'net' library and communicates with distant service over tcp. This script is started using 'node script.js >> log.txt' command and everything in that script that is logged using console.log() function gets written to log.txt but sometimes script dies and I cannot find a reason and nothing gets logged in log.txt around the time script crashed.

How can I capture crash reason?

© Stack Overflow or respective owner

Related posts about node.js