Skip to content

Instantly share code, notes, and snippets.

@KoryNunn
Created March 6, 2014 01:39
Show Gist options
  • Select an option

  • Save KoryNunn/9380511 to your computer and use it in GitHub Desktop.

Select an option

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.
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