From 5727d5f810363deb23778b13f568a4b60bdb9085 Mon Sep 17 00:00:00 2001 From: Shweta Jain Date: Mon, 6 Nov 2017 15:17:38 +0530 Subject: [PATCH] Resolve TypeError for bunyan-loggly --- lib/loggly/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/loggly/client.js b/lib/loggly/client.js index a40cb6d..6ab7d96 100644 --- a/lib/loggly/client.js +++ b/lib/loggly/client.js @@ -158,7 +158,7 @@ Loggly.prototype.log = function (msg, tags, callback) { accept: '*/*', 'user-agent': this.userAgent, 'content-type': this.json ? 'application/json' : 'text/plain', - 'content-length': Buffer.byteLength(msg) + 'content-length': Buffer.byteLength(JSON.stringify(msg)) } };