console.log when firebug exists or not
//sometimes we forget to comment firebug console.log statement in production web
//and spawn lots of errors, here's the code on how to override console.log method when
//firebug not exists
(function(__global){
if (!__global.console || (__global.console && !__global.console.log)) {
__global.console = {
log: (__global.opera && __global.opera.postError)
? __global.opera.postError
: function(){ }
}
}
})(this);
Any ideas how to overwrite the firebug console to get no logging in production?