refactor: improve start transaction sanity checks log messages
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 3 Aug 2023 17:37:57 +0000 (19:37 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 3 Aug 2023 17:37:57 +0000 (19:37 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts

index 4e7b9716d1f11428508e8075be18c1f0b5df4ad5..6dcc5d5d2cf5f916f68838321ecb940075fdd6d4 100644 (file)
@@ -560,8 +560,7 @@ export class OCPP16ResponseService extends OCPPResponseService {
     }
     if (connectorStatus?.transactionStarted === true) {
       logger.error(
-        `${chargingStation.logPrefix()} Trying to start a transaction on an already used connector id ${connectorId}:`,
-        connectorStatus,
+        `${chargingStation.logPrefix()} Trying to start a transaction on an already used connector id ${connectorId} by idTag ${connectorStatus?.transactionIdTag}}`,
       );
       return;
     }
@@ -571,8 +570,7 @@ export class OCPP16ResponseService extends OCPPResponseService {
           for (const [id, status] of evseStatus.connectors) {
             if (id !== connectorId && status?.transactionStarted === true) {
               logger.error(
-                `${chargingStation.logPrefix()} Trying to start a transaction on an already used evse id ${evseId}:`,
-                evseStatus,
+                `${chargingStation.logPrefix()} Trying to start a transaction on an already used evse id ${evseId} by connector id ${id} with idTag ${status?.transactionIdTag}}`,
               );
               await this.resetConnectorOnStartTransactionError(chargingStation, connectorId);
               return;