From 1952d47442730ae2d43c7ecf1ef11650c9b5ace7 Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:34:25 -0700 Subject: [PATCH] ansible: log line with length if parsing fails --- .../metrics/files/process-cloudflare/process-cloudflare.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/roles/metrics/files/process-cloudflare/process-cloudflare.js b/ansible/roles/metrics/files/process-cloudflare/process-cloudflare.js index 081af2bac..2fa05a94a 100755 --- a/ansible/roles/metrics/files/process-cloudflare/process-cloudflare.js +++ b/ansible/roles/metrics/files/process-cloudflare/process-cloudflare.js @@ -164,7 +164,10 @@ function createPipeline (bucket, filename, processedFile, callback) { const jsonparse = JSON.parse(line) const printout = logTransform2(jsonparse) if (printout !== undefined) { results = results.concat(printout) } - } catch (err) { console.log(err) } + } catch (err) { + console.log('ERROR PARSING: "' + line + '" of length ' + line.length) + console.log(err) + } } writeBucket.file(processedFile).save(results, function (err) {