I know its easy to intercept a function in js, among other ways:
console.log = (function () {
var log = console.log;
return function () {
alert(arguments);
log.apply(console, arguments);
})();
but Is there a way to wrap console.log such that when a user calls
console.log("hi")//in random.js
in the console it shows the random.js origin, and not the location of the intercept?