You can back up the console before overwriting it.
var oldConsole = window.console;
window.console = { log:function(msg){alert(msg)} //...};
Then you can use the oldConsole
variable.
oldConsole.log('test');
If you can't back it up, you can create an iFrame, and then steal the console from there (this may not work in all browsers):
var i = document.createElement('iframe');
i.style.display = 'none';
document.body.appendChild(i);
window.console = i.contentWindow.console;
Demo: http://jsfiddle.net/jcG7E/2
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…