Looking for a node.js package that handles stack tracing similar to how this is done in RoR:
Rails: Logging the entire stack trace of an exception
You can get this text off of the .stack
property from any Error. For instance:
try { throw new Error(); } catch (e) { console.log(e.stack); }
or just new
up an error for the purposes of getting the stack trace
console.log(new Error().stack)
there's a function for that: console.trace()
In case you don't want to log to console you can get the stack trace string value using new Error().stack
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With