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

LB-872 Improve Node with retry logic and queue #5

Merged
merged 3 commits into from Jan 17, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

store maximum bytes value into a constant variable

  • Loading branch information
Shwetajain148 committed Jan 11, 2017
commit da058a3336219795f2cedb254df6028e8f1e2627
@@ -5,7 +5,10 @@
* MIT LICENSE
*
*/

//
// Setting constant value of EVENT_SIZE variable
//
var EVENT_SIZE = 1000 * 1000;
var events = require('events'),
util = require('util'),
qs = require('querystring'),
@@ -26,7 +29,7 @@ function stringify(msg) {
// function to truncate message over 1 MB
//
function truncateLargeMessage(message) {
var MaximumBytesAllowedToLoggly = 1000 * 1000;
var maximumBytesAllowedToLoggly = EVENT_SIZE;
var bytesLengthOfLogMessage = Buffer.byteLength(message);
if(bytesLengthOfLogMessage > MaximumBytesAllowedToLoggly) {
message = message.slice(0, MaximumBytesAllowedToLoggly);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.