Merge pull request #813 from SAP/combined-prs-branch
[e-mobility-charging-stations-simulator.git] / src / charging-station / Bootstrap.ts
index 0cd15055871405fdf7441d89a362f260cd68269e..db3c62448877e08cde03de80e7352fed279ba8e7 100644 (file)
@@ -259,7 +259,7 @@ export class Bootstrap extends EventEmitter {
     // logger.debug(
     //   `${this.logPrefix()} ${moduleName}.messageHandler: Worker channel message received: ${JSON.stringify(
     //     msg,
-    //     null,
+    //     undefined,
     //     2,
     //   )}`,
     // );
@@ -297,7 +297,7 @@ export class Bootstrap extends EventEmitter {
           throw new BaseError(
             `Unknown charging station worker event: '${
               msg.event
-            }' received with data: ${JSON.stringify(msg.data, null, 2)}`,
+            }' received with data: ${JSON.stringify(msg.data, undefined, 2)}`,
           );
       }
     } catch (error) {
@@ -389,9 +389,9 @@ export class Bootstrap extends EventEmitter {
   }
 
   private gracefulShutdown = (): void => {
-    console.info(`${chalk.green('Graceful shutdown')}`);
     this.stop()
       .then(() => {
+        console.info(`${chalk.green('Graceful shutdown')}`);
         exit(exitCodes.succeeded);
       })
       .catch((error) => {