1
2
3
if (typeof console.log != function) {
    console.log = function(){ /* ... */ } 
}