refactor: improve recurring charging profile mishandling error log
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 24 Jul 2023 15:36:20 +0000 (17:36 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 24 Jul 2023 15:36:20 +0000 (17:36 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStationUtils.ts

index e0a68e531a197930626af3fcc336ae57dc79f63f..aa590b7819b197cf59d4bf2150288eada03b4d2c 100644 (file)
@@ -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`,
               );