Skip to content

Commit

Permalink
Modify generation dispatch logs related to not found generators
Browse files Browse the repository at this point in the history
Signed-off-by: Ayoub LABIDI <[email protected]>
  • Loading branch information
ayolab committed Aug 1, 2024
1 parent 107ace1 commit dc7c191
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,13 @@ private List<String> exportFilters(List<GeneratorsFilterInfos> generatorsFilters
.filter(e -> !CollectionUtils.isEmpty(e.getValue().getNotFoundEquipments()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
filtersWithGeneratorsNotFound.values().forEach(f -> {
var generatorsIds = String.join(", ", f.getNotFoundEquipments());
report(subReportNode, "", "filterGeneratorsNotFound", "Cannot find the following generators ${generatorsIds} in filter ${filterName}",
Map.of("generatorsIds", generatorsIds, "filterName", filters.get(f.getFilterId())),
var filterName = filters.get(f.getFilterId());
var notFoundGenerators = f.getNotFoundEquipments();
report(subReportNode, "", "filterGeneratorsNotFound", "Cannot find ${nbNotFoundGen} generators in filter ${filterName}",
Map.of("nbNotFoundGen", notFoundGenerators.size(), "filterName", filterName),
TypedValue.WARN_SEVERITY);
f.getNotFoundEquipments().forEach(e -> report(subReportNode, "", "generatorNotFound", "Cannot find generator ${notFoundGeneratorId} in filter ${filterName}",
Map.of("notFoundGeneratorId", e, "filterName", filterName), TypedValue.TRACE_SEVERITY));
});

return exportedGenerators.values()
Expand Down

0 comments on commit dc7c191

Please sign in to comment.