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

Support special characters readability #54

Merged
merged 1 commit into from Aug 2, 2018

Conversation

@Shwetajain148
Copy link
Contributor

@Shwetajain148 Shwetajain148 commented Aug 2, 2018

Hi, In this PR, I have added a new flag variable which is configurable and will include the charset=utf-8 property in the request header. This will enable the better readability of special characters being send in the log events.

This has been tested completely and ready to merge. @psamit can you please review.

Thanks!

@@ -155,7 +164,11 @@
//creating an asynchronous XMLHttpRequest
var xmlHttp = new XMLHttpRequest();
xmlHttp.open('POST', this.inputUrl, true); //true for asynchronous request
xmlHttp.setRequestHeader('Content-Type', 'text/plain');
if (tracker.useUtfEncoding === true) {

This comment has been minimized.

@psamit

psamit Aug 2, 2018

useUtfEncoding is already a boolean so no need to check with true, false or undefined.

data.useUtfEncoding for true and !data.useUtfEncoding for false or undefined will be sufficient here.

This comment has been minimized.

@psamit

psamit Aug 2, 2018

Changes looks good to me.

This comment has been minimized.

@Shwetajain148

Shwetajain148 Aug 2, 2018
Author Contributor

Got it, thanks @psamit .

@Shwetajain148 Shwetajain148 merged commit 0dcbeb6 into loggly:master Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.