From 5f233e2e307e5202bfe1f319185f0880d354cb67 Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Wed, 13 Jan 2021 12:26:35 +0000 Subject: Avoiding unwanted logging in APEX during event processing Change-Id: If0c93bfea08025c6c10e3f4572a14088990f415f Issue-ID: POLICY-2885 Signed-off-by: a.sreekumar --- .../apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml') 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 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; -- cgit 1.2.3-korg