Skip to content

Instantly share code, notes, and snippets.

@fendent
Created February 6, 2012 19:59
Show Gist options
  • Save fendent/1754448 to your computer and use it in GitHub Desktop.
Save fendent/1754448 to your computer and use it in GitHub Desktop.
cross-browser console.log implementation
/**
* Simple cross-browser console.log implementation
*
* Sean Murphy - https://gist.github.com/1754448
*/
(function (x, w, o, join) { w.console = w.console || x;
x.log = x.warn = x.info = x.error = o ? o.postError :
function log() { alert(join.call(arguments, ' ')) };
})({}, window, window.opera, Array.prototype.join);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment