I'm working on enhancing logging in some node.js applications. In the past have used C++'s __ file__ and __ line __ preprocessor macros to help us track down issues when logging events. I haven't found anything similar to it in the node.js world.
Does anyone have suggestions or know how I can get line number and file name in node.js for logging purposes?
I'm looking for something like:
console.log(__FILE__ + "." + __LINE__ + "\t" + new Date().toISOString() + " Message ");