summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-01-13 12:26:35 +0000
committera.sreekumar <ajith.sreekumar@bell.ca>2021-01-13 17:53:17 +0000
commit5f233e2e307e5202bfe1f319185f0880d354cb67 (patch)
treeb64ef887a5a7a82699806955bca528d382853c30 /plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java
parentd05021ebfc7a7f57cb88a5e380b403118ceeaa13 (diff)
Avoiding unwanted logging in APEX during event processing
Change-Id: If0c93bfea08025c6c10e3f4572a14088990f415f Issue-ID: POLICY-2885 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java')
-rw-r--r--plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java7
1 files changed, 1 insertions, 6 deletions
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java
index 59c9c21c1..faae7527c 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -61,7 +62,6 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
// Check and get the YAML parameters
if (!(parameters instanceof YamlEventProtocolParameters)) {
final String errorMessage = "specified consumer properties are not applicable to the YAML event protocol";
- LOGGER.warn(errorMessage);
throw new ApexEventRuntimeException(errorMessage);
}
@@ -75,7 +75,6 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
public List<ApexEvent> toApexEvent(final String eventName, final Object eventObject) throws ApexEventException {
// Check the event eventObject
if (eventObject == null) {
- LOGGER.warn("event processing failed, event is null");
throw new ApexEventException("event processing failed, event is null");
}
@@ -83,7 +82,6 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
// always work
if (!(eventObject instanceof String)) {
final String errorMessage = "error converting event \"" + eventObject + "\" to a string";
- LOGGER.debug(errorMessage);
throw new ApexEventException(errorMessage);
}
@@ -127,7 +125,6 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
public Object fromApexEvent(final ApexEvent apexEvent) throws ApexEventException {
// Check the Apex event
if (apexEvent == null) {
- LOGGER.warn("event processing failed, Apex event is null");
throw new ApexEventException("event processing failed, Apex event is null");
}
@@ -155,7 +152,6 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
if (!eventField.getOptional()) {
final String errorMessage = "error parsing " + eventDefinition.getId() + " event to Json. "
+ "Field \"" + fieldName + "\" is missing, but is mandatory. Fields: " + apexEvent;
- LOGGER.debug(errorMessage);
throw new ApexEventRuntimeException(errorMessage);
}
continue;
@@ -192,7 +188,6 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter {
if (!eventField.getOptional()) {
final String errorMessage = "error parsing " + eventDefinition.getId() + " event from Json. "
+ "Field \"" + fieldName + "\" is missing, but is mandatory.";
- LOGGER.debug(errorMessage);
throw new ApexEventException(errorMessage);
}
continue;