From: Jérôme Benoit Date: Wed, 24 May 2023 18:50:03 +0000 (+0200) Subject: refactor(simulator): warn at startup for missing id tags file X-Git-Tag: v1.2.14~17 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=111aaf897c1c7b5c2f48678923a458f62406e3e2;p=e-mobility-charging-stations-simulator.git refactor(simulator): warn at startup for missing id tags file Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStationUtils.ts b/src/charging-station/ChargingStationUtils.ts index e76b3a6e..6fde11e2 100644 --- a/src/charging-station/ChargingStationUtils.ts +++ b/src/charging-station/ChargingStationUtils.ts @@ -175,6 +175,14 @@ export class ChargingStationUtils { `${logPrefix} Empty automatic transaction generator configuration from template file ${templateFile}, set to default values` ); } + if ( + Utils.isNullOrUndefined(stationTemplate.idTagsFile) || + Utils.isEmptyString(stationTemplate.idTagsFile) + ) { + logger.warn( + `${logPrefix} Missing id tags file in template file ${templateFile}. That can lead to issues with the Automatic Transaction Generator` + ); + } } public static checkConnectorsConfiguration( diff --git a/src/charging-station/IdTagsCache.ts b/src/charging-station/IdTagsCache.ts index e5ee13c3..ff5c49d9 100644 --- a/src/charging-station/IdTagsCache.ts +++ b/src/charging-station/IdTagsCache.ts @@ -180,7 +180,6 @@ export class IdTagsCache { ); } } - logger.info(`${this.logPrefix(file)} No id tags file given in configuration`); return []; }