From bcb7f45377c3a5f0db937dc3ba196d09e8a1579a Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Mon, 11 Nov 2024 12:19:22 +0100 Subject: [PATCH 1/2] Fix bulk logging not sending all logs --- lib/loggly/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/loggly/common.js b/lib/loggly/common.js index 58d3db1..76c7e00 100644 --- a/lib/loggly/common.js +++ b/lib/loggly/common.js @@ -233,7 +233,7 @@ common.loggly = function () { // Join Array Message with new line ('\n') character // if (arrMsg.length) { - requestOptions.body = arrMsg.join('\n'); + requestOptions.data = arrMsg.join('\n'); arrMsg.length = 0; } try { From 13c4b39f58c7352a59818f61411d396eec34af1c Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Mon, 11 Nov 2024 12:19:36 +0100 Subject: [PATCH 2/2] Fix bulk logging not applying tags --- lib/loggly/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/loggly/common.js b/lib/loggly/common.js index 76c7e00..dbc09d1 100644 --- a/lib/loggly/common.js +++ b/lib/loggly/common.js @@ -144,7 +144,7 @@ common.loggly = function () { } } var requestOptions = { - uri: (isBulk && headers['X-LOGGLY-TAG']) ? uri + '/tag/' + headers['X-LOGGLY-TAG'] : uri, + url: (isBulk && headers['X-LOGGLY-TAG']) ? uri + '/tag/' + headers['X-LOGGLY-TAG'] : uri, method: method, headers: isBulk ? {} : headers || {}, // Set headers empty for bulk proxy: proxy, @@ -238,7 +238,7 @@ common.loggly = function () { } try { // eslint-disable-next-line no-unused-vars - axios(uri, requestOptions).then(function(res){ + axios(requestOptions).then(function(res){ const responseCode = res.status; if (responseCode === httpStatusCode.badToken.code) { isValidToken = false;