From 00a3321009f2d4f9f56d1951072af8105a47295e Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 16 Jun 2021 12:07:51 +0200 Subject: [PATCH 1/3] log checks on failure --- packages/health-check/src/run.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/health-check/src/run.js b/packages/health-check/src/run.js index cfebfced..121f3cb7 100644 --- a/packages/health-check/src/run.js +++ b/packages/health-check/src/run.js @@ -41,6 +41,7 @@ require("yargs/yargs")(process.argv.slice(2)).command( // exit with code 1 if any of the checks report failure if (checks.some(({ up }) => !up)) { + console.log(checks); process.exit(1); } } From c241178a4c04935a4907b40a83a3fbf953debd5b Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 16 Jun 2021 12:09:56 +0200 Subject: [PATCH 2/3] use entry.checks --- packages/health-check/src/run.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/health-check/src/run.js b/packages/health-check/src/run.js index 121f3cb7..b1ccaaac 100644 --- a/packages/health-check/src/run.js +++ b/packages/health-check/src/run.js @@ -40,8 +40,8 @@ require("yargs/yargs")(process.argv.slice(2)).command( .write(); // exit with code 1 if any of the checks report failure - if (checks.some(({ up }) => !up)) { - console.log(checks); + if (entry.checks.some(({ up }) => !up)) { + console.log(entry.checks); process.exit(1); } } From 27c38082ecb0ef40aeb8f14494bf6819c46266b8 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Wed, 16 Jun 2021 12:14:41 +0200 Subject: [PATCH 3/3] print failures --- packages/health-check/src/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/health-check/src/run.js b/packages/health-check/src/run.js index b1ccaaac..26f4c643 100644 --- a/packages/health-check/src/run.js +++ b/packages/health-check/src/run.js @@ -41,7 +41,7 @@ require("yargs/yargs")(process.argv.slice(2)).command( // exit with code 1 if any of the checks report failure if (entry.checks.some(({ up }) => !up)) { - console.log(entry.checks); + console.log(entry.checks.filter(({ up }) => !up)); process.exit(1); } }