From 6c8d3332b2a189a435cfeb00c942a09071c8c1df Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 24 Jul 2023 17:36:20 +0200 Subject: [PATCH] refactor: improve recurring charging profile mishandling error log MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStationUtils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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`, ); -- 2.34.1