From bd96658b13f09b3c2a95120da98d98187b744bd7 Mon Sep 17 00:00:00 2001 From: Geoff Goodman Date: Fri, 28 Jun 2019 12:22:32 -0400 Subject: [PATCH] Log error message from failed send attempts Currently, logs show the following which is not helpful in identifying a problem with the log export. ```checkpoint: 90020190628032144798656085170094219032655730256692379730 start: 2019-06-28T03:21:51.914Z end: 2019-06-28T03:21:57.119Z logsProcessed: 0 error: [{"cause":{},"isOperational":true},"Skipping logs from 90020190628031540443551250646802263919691376682789240930 to 90020190628032144798656085170094219032655730256692379730 after 5 retries."]``` --- src/processor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processor.js b/src/processor.js index 9266952..51988d6 100644 --- a/src/processor.js +++ b/src/processor.js @@ -209,7 +209,7 @@ LogsProcessor.prototype.run = function(handler) { ]; if (options.logger) { - options.logger.error(error[0], error[1]); + options.logger.error(error[0] && error[0].message || error[0], error[1]); } // We're giving up.