Skip to content

Commit 544d5b9

Browse files
authored
Add logs to load creation (#225)
Signed-off-by: Seddik Yengui <[email protected]>
1 parent 6fc7736 commit 544d5b9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/main/java/org/gridsuite/modification/server/modifications/LoadCreation.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,26 @@ public void apply(Network network, Reporter subReporter) {
6262
.withSeverity(TypedValue.INFO_SEVERITY)
6363
.build());
6464
}
65+
66+
reportElementaryCreations(subReporter);
67+
}
68+
69+
private void reportElementaryCreations(Reporter subReporter) {
70+
if (modificationInfos.getEquipmentName() != null) {
71+
ModificationUtils.getInstance()
72+
.reportElementaryCreation(subReporter, modificationInfos.getEquipmentName(), "Name");
73+
}
74+
75+
if (modificationInfos.getLoadType() != null) {
76+
ModificationUtils.getInstance()
77+
.reportElementaryCreation(subReporter, modificationInfos.getLoadType(), "Type");
78+
}
79+
80+
ModificationUtils.getInstance()
81+
.reportElementaryCreation(subReporter, modificationInfos.getActivePower(), "Active power");
82+
83+
ModificationUtils.getInstance()
84+
.reportElementaryCreation(subReporter, modificationInfos.getReactivePower(), "Reactive power");
6585
}
6686

6787
private LoadAdder createLoadAdderInNodeBreaker(VoltageLevel voltageLevel, LoadCreationInfos loadCreationInfos) {

0 commit comments

Comments
 (0)