Last active
October 12, 2016 13:05
-
-
Save rubeniskov/ea1d867c66a4ed1c1e14abacf082765e to your computer and use it in GitHub Desktop.
Sometime when console trace is put in a file if we lost where is it, this util can be usefull to locate it
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
function getErrorObject() { | |
try { | |
throw Error('') | |
} catch (err) { | |
return err; | |
} | |
} | |
var test = console.log; | |
console.log = function() { | |
test.apply(this, [getErrorObject().stack.split("\n")[4]].concat(arguments)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment