From dcda0566d1bcc7e3390faeb044a5195ac0c811a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 3 Aug 2023 19:37:57 +0200 Subject: [PATCH] refactor: improve start transaction sanity checks log messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/1.6/OCPP16ResponseService.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts index 4e7b9716..6dcc5d5d 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts @@ -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; -- 2.34.1