From: Jérôme Benoit Date: Mon, 24 Jul 2023 15:36:20 +0000 (+0200) Subject: refactor: improve recurring charging profile mishandling error log X-Git-Tag: v1.2.20~159^2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=6c8d3332b2a189a435cfeb00c942a09071c8c1df;p=e-mobility-charging-stations-simulator.git refactor: improve recurring charging profile mishandling error log Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStationUtils.ts b/src/charging-station/ChargingStationUtils.ts index e0a68e53..aa590b78 100644 --- a/src/charging-station/ChargingStationUtils.ts +++ b/src/charging-station/ChargingStationUtils.ts @@ -716,7 +716,9 @@ const getLimitFromChargingProfiles = ( isAfter(chargingSchedule.startSchedule, endOfDay(currentDate)) ) { logger.error( - `${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Recurring charging profile id ${ + `${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Recurring ${ + chargingProfile.recurrencyKind + } charging profile id ${ chargingProfile.chargingProfileId } startSchedule ${chargingSchedule.startSchedule.toISOString()} is not properly translated to the current day`, ); @@ -734,7 +736,9 @@ const getLimitFromChargingProfiles = ( isAfter(chargingSchedule.startSchedule, endOfWeek(currentDate)) ) { logger.error( - `${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Recurring charging profile id ${ + `${logPrefix} ${moduleName}.getLimitFromChargingProfiles: Recurring ${ + chargingProfile.recurrencyKind + } charging profile id ${ chargingProfile.chargingProfileId } startSchedule ${chargingSchedule.startSchedule.toISOString()} is not properly translated to the current week`, );