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

Resolve TypeError for bunyan-loggly #26

Merged
merged 1 commit into from Nov 7, 2017

Conversation

@Shwetajain148
Copy link

@Shwetajain148 Shwetajain148 commented Nov 6, 2017

@mchaudhary @mostlyjason The issue #10 is related to bunyan-loggly library in which when we log any message then it comes in the array form and when it goes to calculate the byte length, it breaks. But in our node-loggly-bulk library when we log the data it comes in the string form and then we calculate the byte length of the log message using Buffer.byteLength() method without any error so it is not breaking with our library.

In this PR, I used the JSON.stringify() method to calculate the byte length of the log message after converting it into a JSON string. This does not change anything in the log and passes in all scenarios like if we pass a JSON object or a string or if the log comes in the array form.

I have checked this with bunyan-loggly, node-loggly-bulk and winston-loggly-bulk libraries and everything looked fine to me.

@marin-liovic
Copy link

@marin-liovic marin-liovic commented Nov 7, 2017

Any ETA on when this could be fixed?

@mchaudhary mchaudhary merged commit 4851a17 into loggly:master Nov 7, 2017
@mostlyjason
Copy link

@mostlyjason mostlyjason commented Nov 7, 2017

@marin-liovic merged will update npm tomorrow

@Shwetajain148 Shwetajain148 deleted the Shwetajain148:resolve-TypeError branch Nov 29, 2017
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

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