From 8d881ce0f1fb699d77a1a5958155ecf08d2ab9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cruz?= Date: Wed, 1 Jan 2025 12:24:11 +0000 Subject: [PATCH] Print errors on each line --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 93f0e5c..0f0eb9a 100644 --- a/src/index.js +++ b/src/index.js @@ -64,7 +64,8 @@ class ProcessManager { exit() { if (this.errors.length > 0) { - this.log.error({ errors: this.errors }, 'Exiting with errors'); + this.log.error(`Exiting with ${this.errors.length} error${this.errors.length > 1 ? 's' : ''}`); + this.errors.forEach(err => this.log.error(err)); // Output console to error in case no `DEBUG` namespace has been set. // This mimicks the default node behaviour of not silencing errors.