Created
March 6, 2014 01:39
-
-
Save KoryNunn/9380511 to your computer and use it in GitHub Desktop.
Print the stack for console logs in node. Good if you can't find where a log is coming from.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var oldlog = console.log; | |
| console.log = function(){ | |
| oldlog.call(this, new Error().stack); | |
| oldlog.apply(this, arguments); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment