After browsing some of the different methods of nerfing console.log, I wanted something much shorter… I was using the html5 boilerplate but it’s a little over kill for just console.log.
Do you see any problems that I might run into using this? It seems to work great in the latest Chrome/FF and IE 7 & FF 3.6.
if (!window.console) {window.console = {}}
if (!window.console.log) {window.console.log = function () {}}
Yeah, it’s fine. Or even shorter: