I've written a very simple function to ensure ensure my applications do not break if I forget to remove a console.log()
.
Simply put:
myNamespace.log = function( msg ){
if( window.console ){
console.log(obj);
}
}
It works like a charm. Alas, I very much liked the ability to see from which line of code and file my console messages came from. Is there a (chrome/FF friendly) way to get the file/line of code a function call?