Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
@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.