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

Removed setTimeOut function #11

Merged
merged 2 commits into from Feb 4, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Removed setTimeOut function

due to setTimeOut function, the code inside it, was running asynchronously and causing delay in setting up of the loggly.tracker.js variables like key, sendConsoleErrors etc. which is stopping the logs to be sent to Loggly during the page load.
  • Loading branch information
varshneyjayant committed Jan 30, 2015
commit 22896ccb3728e6327ca024b11bd18ca1b2e09a0f
@@ -84,42 +84,42 @@

var self = this;

setTimeout(function() {
if(type === 'string') {
data = {
'text': data
};
} else {
if(data.logglyCollectorDomain) {
self.logglyCollectorDomain = data.logglyCollectorDomain;
return;
}

if(data.sendConsoleErrors !== undefined) {
setSendConsoleError(self, data.sendConsoleErrors);
}

if(data.tag){
setTag(self, data.tag);
}

if(data.logglyKey) {
setKey(self, data.logglyKey);
return;
}

if(data.session_id) {
self.setSession(data.session_id);
return;
}

if(type === 'string') {
data = {
'text': data
};
} else {
if(data.logglyCollectorDomain) {
self.logglyCollectorDomain = data.logglyCollectorDomain;
return;
}

if(!self.key) {

if(data.sendConsoleErrors !== undefined) {
setSendConsoleError(self, data.sendConsoleErrors);
}

if(data.tag){
setTag(self, data.tag);
}

if(data.logglyKey) {
setKey(self, data.logglyKey);
return;
}

if(data.session_id) {
self.setSession(data.session_id);
return;
}
}

if(!self.key) {
return;
}

self.track(data);

self.track(data);
}, 0);

},
track: function(data) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.