Suppose I want to include some calls to console.log
for some legitimate production reason, say for something like a unit test harness. Obviously I would not want th
The problem with wrappers is that they will obfuscate file name and line number of the source of the log message.
Simple IE7 and below shim that preserves Line Numbering for other browsers:
/* console shim*/
(function () {
var f = function () {};
if (!window.console) {
window.console = {
log:f, info:f, warn:f, debug:f, error:f
};
}
}());