aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/clamp/loop/log/LoopLogService.java
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2019-05-23 17:34:07 +0200
committersebdet <sebastien.determe@intl.att.com>2019-06-05 11:05:35 +0200
commit09bc8450b2b0c4f60eb4a241efc548d13c5c9912 (patch)
treeaddd899e38e02946a6dfa3997b7a43264bd0276a /src/main/java/org/onap/clamp/loop/log/LoopLogService.java
parentc7b7368b08fa4e75919d6f7282dee526ccedf398 (diff)
Rework the loop state
Rework the state loop so there is no bug in the loop state anymore, now the components are scanned + upgrade to 4.0.4 Issue-ID: CLAMP-384 Change-Id: If7649238ee52864c84bfb9b6b8471d1738752e29 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/java/org/onap/clamp/loop/log/LoopLogService.java')
-rw-r--r--src/main/java/org/onap/clamp/loop/log/LoopLogService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/onap/clamp/loop/log/LoopLogService.java b/src/main/java/org/onap/clamp/loop/log/LoopLogService.java
index b02bc11c..d02d0b27 100644
--- a/src/main/java/org/onap/clamp/loop/log/LoopLogService.java
+++ b/src/main/java/org/onap/clamp/loop/log/LoopLogService.java
@@ -38,7 +38,11 @@ public class LoopLogService {
}
public void addLog(String message, String logType, Loop loop) {
- repository.save(new LoopLog(message, LogType.valueOf(logType), loop));
+ this.addLogForComponent(message, logType, "CLAMP", loop);
+ }
+
+ public void addLogForComponent(String message, String logType, String component, Loop loop) {
+ loop.addLog(repository.save(new LoopLog(message, LogType.valueOf(logType), component, loop)));
}
public boolean isExisting(Long logId) {