diff options
Diffstat (limited to 'rulemgt/src')
-rw-r--r-- | rulemgt/src/main/java/org/onap/holmes/rulemgt/wrapper/RuleMgtWrapper.java | 5 | ||||
-rw-r--r-- | rulemgt/src/main/resources/logback-spring.xml | 6 |
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> |