From 1e59c93905e1588a5c0947e8c1956520b02e12e7 Mon Sep 17 00:00:00 2001 From: EtienneLt <32468651+EtienneLt@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:30:27 +0200 Subject: [PATCH] fix the logs of hvdc creation (#525) Signed-off-by: Etienne LESOT --- .../server/modifications/VscCreation.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/gridsuite/modification/server/modifications/VscCreation.java b/src/main/java/org/gridsuite/modification/server/modifications/VscCreation.java index 43d79e597..4e4540e1c 100644 --- a/src/main/java/org/gridsuite/modification/server/modifications/VscCreation.java +++ b/src/main/java/org/gridsuite/modification/server/modifications/VscCreation.java @@ -175,16 +175,15 @@ private VscConverterStation createConverterStation(Network network, ConverterStationCreationInfos converterStationCreationInfos, ReportNode subReportNode, String logFieldName) { - ReportNode converterStationReporter = subReportNode.newReportNode().withMessageTemplate("converterStationCreationContainer" + logFieldName, logFieldName).add(); + ReportNode converterStationReporter = subReportNode.newReportNode() + .withMessageTemplate("converterStationCreated", "${fieldName} with id=${id} created") + .withUntypedValue("fieldName", logFieldName) + .withUntypedValue("id", converterStationCreationInfos.getEquipmentId()) + .add(); VoltageLevel voltageLevel = ModificationUtils.getInstance().getVoltageLevel(network, converterStationCreationInfos.getVoltageLevelId()); VscConverterStation vscConverterStation = voltageLevel.getTopologyKind() == TopologyKind.NODE_BREAKER ? createConverterStationInNodeBreaker(network, voltageLevel, converterStationCreationInfos, converterStationReporter) : createConverterStationInBusBreaker(voltageLevel, converterStationCreationInfos, converterStationReporter); - converterStationReporter.newReportNode() - .withMessageTemplate("converterStationCreationLog" + logFieldName, "New converter station with id=${id} created") - .withUntypedValue("id", converterStationCreationInfos.getEquipmentId()) - .withSeverity(TypedValue.INFO_SEVERITY) - .add(); if (!converterStationCreationInfos.isTerminalConnected()) { vscConverterStation.getTerminal().disconnect();