Can I catch console.log calls but still show the correct caller information / link to source code in the browser's console?
I know I can do
myModule.js
var oldLog = console.log;
console.log = function (message) {
// ... I want to do something here in this line ...
oldLog.apply(console, arguments);
}
But when I do this, then the browser's console will always show myModule.js as the source of the log message. Not the module that actually called the (overwritten) console.log() method.