Skip to content

Commit

Permalink
fix the logs of hvdc creation (#525)
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne LESOT <[email protected]>
  • Loading branch information
EtienneLt authored Sep 11, 2024
1 parent f2d388a commit 1e59c93
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1e59c93

Please sign in to comment.