Skip to content

Instantly share code, notes, and snippets.

@BastinRobin
Created August 13, 2014 09:49
Show Gist options
  • Save BastinRobin/572514a0673315b08d9e to your computer and use it in GitHub Desktop.
Save BastinRobin/572514a0673315b08d9e to your computer and use it in GitHub Desktop.
Javascript Error Logger
function log(e, msg) {
for (var i in e) { msg += i + "=" + e[i] + "\n"; }
(new Image()).src="log.pl?m=" + encodeURIComponent(msg);
}
function abc() {
try {
// ... function code
} catch(e) { log(e, "abc"); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment