From: Jérôme Benoit Date: Wed, 2 Aug 2023 15:38:15 +0000 (+0200) Subject: refactor: improve debug log messages X-Git-Tag: v1.2.20~40 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=88499f52f95a8030eb2186b918fac160b95e58a5;p=e-mobility-charging-stations-simulator.git refactor: improve debug log messages Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Helpers.ts b/src/charging-station/Helpers.ts index 1dfc0f80..f263daa4 100644 --- a/src/charging-station/Helpers.ts +++ b/src/charging-station/Helpers.ts @@ -863,7 +863,7 @@ export const prepareChargingProfileKind = ( case ChargingProfileKindType.RELATIVE: if (!isNullOrUndefined(chargingProfile.chargingSchedule.startSchedule)) { logger.warn( - `${logPrefix} ${moduleName}.prepareChargingProfileKind: Charging profile id ${chargingProfile.chargingProfileId} has a startSchedule property defined. It will be ignored or set to the connector current transaction start date`, + `${logPrefix} ${moduleName}.prepareChargingProfileKind: Charging profile id ${chargingProfile.chargingProfileId} has a startSchedule property defined. It will be ignored or used if the connector has a transaction started`, ); delete chargingProfile.chargingSchedule.startSchedule; } diff --git a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts index 222406c6..502258c2 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts @@ -942,6 +942,10 @@ export class OCPP16ServiceUtils extends OCPPServiceUtils { !hasReservationExpired(chargingStationReservation) && chargingStationReservation?.idTag === idTag) ) { + logger.debug( + `${chargingStation.logPrefix()} Connector id ${connectorId} has a valid reservation for idTag ${idTag}: %j`, + connectorReservation ?? chargingStationReservation, + ); return true; } return false;