Skip to content

Instantly share code, notes, and snippets.

@cemerson
Created February 16, 2014 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cemerson/9033177 to your computer and use it in GitHub Desktop.
Save cemerson/9033177 to your computer and use it in GitHub Desktop.
JavaScript: Basic Log Function
if (!window.console) window.console = {};
if (!window.console.log) window.console.log = function () { };
function report(msg,ex){
if(!!ex) msg = 'ERROR in [' + msg + ']. Message: ' + ex.Message;
window.console.log(msg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment