(function(){ var log = console.log; console.log = function(a){ alert(a); log.apply(this, arguments); } })(); console.log("It's a Magic!")