lucamilan
9/13/2012 - 3:36 PM

Abstract console.log

Abstract console.log

if (!(window.console && console.log)) {
    (function() {
        var noop = function() {},
            methods = ['error', 'warn', 'info', 'debug', 'log'],
            i = methods.length,
            console = window.console = {};
        while ( i--  ) {
            console[methods[i]] = noop;
        }
    }());
}