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

injecting log to any javascript function #51

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

Merge branch 'master' into master

  • Loading branch information
dhewzulla committed Aug 24, 2018
commit 77573a73b34e893e240898da0cef1bf9e16f38cc
@@ -187,9 +187,13 @@
//creating an asynchronous XMLHttpRequest
var xmlHttp = new XMLHttpRequest();
xmlHttp.open('POST', this.inputUrl, true); //true for asynchronous request
xmlHttp.setRequestHeader('Content-Type', 'text/plain');
xmlHttp.send(toStringValue(data));

if (tracker.useUtfEncoding === true) {
xmlHttp.setRequestHeader('Content-Type', 'text/plain; charset=utf-8');
} else {
xmlHttp.setRequestHeader('Content-Type', 'text/plain');
}
xmlHttp.send(JSON.stringify(data));
} catch (ex) {
if (window && window.console && typeof window.console.log === 'function') {
console.log("Failed to log to loggly because of this exception:\n" + ex);
You are viewing a condensed version of this merge commit. You can view the full changes here.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.