cute-stack
cute-stack copied to clipboard
Cute up your stack traces in Node
I apologize for my code formatter messing with some spacing and formatting, but this PR is in response to #13 wherein cute-stack needs to be required after the server starts....
Just tried this library on our and I was getting issue #13 so I moved the init to after the server starts but now get this different error. If it...
Loaded `cute-stack` programmatically and seeing the following when starting my server: ``` /Users/jamesdixon/Projects/scout/platform/api/node_modules/cute-stack/index.js:162 .substr(0, col) ^ TypeError: Cannot read property 'substr' of undefined .♦cute-stack/index.js 162,9 module.js 385,24 Module._compile module.js 422,10...
so instead of ``` at fn (/some/path/to/file:2:1) at fn (/some/path/to/file:2:1) at fn (/some/path/to/file:2:1) at fn (/some/path/to/file:2:1) at foo (/some/path/to/file:1:1) ``` we could have ``` at fn (/some/path/to/file:2:1) [x4] at foo...
in favour of `node -r cute-stack my-app.js` this would mean less maintenance - what do you think @bahmutov? we could also add `node -r cute-stack my-app.js --cute-stack-type=table` or something
e.g. output line numbers relative to source instead of compiled for transpile/compile scenarios
cute-stack could be useful on the browser side too - particularly for postmortem stack strategies However this does open up a whole can of worms (e.g. only v8 has Error.prepareStackTrace...
Any value to having a secondary purpose - persisted stack logs for post mortem analysis So plugins that actually append to log files, or logger databases etc - the JSON...