Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added gitignore and added retries for failed batch attempts #43

Open
wants to merge 8 commits into
base: master
from
Prev

A few little cleanup items

  • Loading branch information
Clark, Jason Clark, Jason
Clark, Jason authored and Clark, Jason committed Aug 4, 2016
commit bfb34a2ebb4b6ca12aed4db917d518f698fc00f1

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

@@ -1,13 +1,12 @@
(function (window, document) {
var LOGGLY_INPUT_PREFIX = 'http' + ( ('https:' === document.location.protocol ? 's' : '') ) + '://',
LOGGLY_COLLECTOR_DOMAIN = 'logs-01.loggly.com',
LOGGLY_SESSION_KEY = 'logglytrackingsession',
LOGGLY_SESSION_KEY_LENGTH = LOGGLY_SESSION_KEY.length + 1,
LOGGLY_PROXY_DOMAIN = 'loggly';
LOGGLY_COLLECTOR_DOMAIN = 'logs-01.loggly.com',
LOGGLY_SESSION_KEY = 'logglytrackingsession',
LOGGLY_SESSION_KEY_LENGTH = LOGGLY_SESSION_KEY.length + 1,
LOGGLY_PROXY_DOMAIN = 'loggly';

function uuid() {
// lifted from here ->
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
// lifted from here -> http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
@@ -184,6 +183,7 @@
clearTimeout(postTimeout);
}
} else if (xmlHttp.status === 200 || xmlHttp.status === 304) {
// It will only run this if there was a previous failure
if(postTimeout) {
console.log("Successfully logged to loggly.");
clearTimeout(postTimeout);
@@ -196,7 +196,6 @@
if (window && window.console && typeof window.console.log === 'function') {
console.log("Failed to log to loggly because of this exception:\n" + ex);
console.log("Failed log data:", data);
console.log("Loggly will attempt in 5 seconds to log this again.");
}
}
},
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.