Is it possible to somehow access to console.log after it gets overwritten?
window.console = { log: function (msg) { alert(msg); }, /* etc... */ };
Edit (2017-04-08): This advise is outdated, in Firefox 52 and Chrome 57 console is no longer defined on the window prototype and deleting it will really delete it.
At least with the console object defined by Firefox and Chrome, you can simply delete the overwritten property to restore the original one:
window.console = {};
delete window.console;
window.console.log("This works!");
This works as if the console property were defined on the prototype of the window object - except that it isn't, the browsers are doing some magic here.