node.js - Adding timestamp to error logs

Viewed 17415

This should be simple, but I can't find a way to prepend a timestamp to node.js error logs. I'm not talking about the output of console.*, but rather the errors that are emitted by exceptions.

I'm running my app with forever, which outputs errors to a separate log and I have no way of determining when the errors occur - which is why I want to add a timestamp.

Can someone point me in the right direction?

1 Answers
Related