summaryrefslogtreecommitdiffstats
path: root/rulemgt/src/main
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2022-10-27 10:52:55 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2022-10-27 10:52:55 +0800
commit2fd6a2e5d048978e347835b3262643b224e5348b (patch)
tree62c5eadeadbf8993b4e5a9681b8e8c6f32908bbe /rulemgt/src/main
parent2cb8d26bb7af8913434d83972eb2c67c2da6908e (diff)
bugfix - response message error
Issue-ID: HOLMES-583 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn> Change-Id: Ida28cec4c1ae5a8c0560b3d4db9ab1647216f021
Diffstat (limited to 'rulemgt/src/main')
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapper.java5
-rw-r--r--rulemgt/src/main/resources/logback-spring.xml6
2 files changed, 7 insertions, 4 deletions
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapper.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapper.java
index ec6e9b3..0d5d110 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapper.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapper.java
@@ -16,6 +16,7 @@
package org.onap.holmes.rulemgt.wrapper;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
import org.onap.holmes.common.api.entity.CorrelationRule;
import org.onap.holmes.common.exception.CorrelationException;
import org.onap.holmes.rulemgt.bean.request.*;
@@ -79,7 +80,9 @@ public class RuleMgtWrapper {
try {
result = correlationRuleService.saveRule(correlationRule);
} catch (CorrelationException e) {
- engineWarpper.deleteRuleFromEngine(packageName, ip);
+ if (StringUtils.isNotEmpty(packageName)) {
+ engineWarpper.deleteRuleFromEngine(packageName, ip);
+ }
throw new CorrelationException(e.getMessage(), e);
}
RuleAddAndUpdateResponse ruleAddAndUpdateResponse = new RuleAddAndUpdateResponse();
diff --git a/rulemgt/src/main/resources/logback-spring.xml b/rulemgt/src/main/resources/logback-spring.xml
index eda9c6b..db95b38 100644
--- a/rulemgt/src/main/resources/logback-spring.xml
+++ b/rulemgt/src/main/resources/logback-spring.xml
@@ -9,7 +9,7 @@
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>debug</level>
+ <level>info</level>
</filter>
</appender>
@@ -46,8 +46,8 @@
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>error</level>
- <onMatch>deny</onMatch>
- <onMismatch>accept</onMismatch>
+ <onMatch>accept</onMatch>
+ <onMismatch>deny</onMismatch>
</filter>
</appender>