From a3979b8a14f6e67de406b29c3e0ad0c516c3bc54 Mon Sep 17 00:00:00 2001 From: "gregory.hayes" Date: Wed, 9 Dec 2020 20:42:33 +0000 Subject: Prune superfluous log and exception messages Large volume exception messages should not be repeated in log messages or in rethrown exceptions. Jira-Link: https://jira.onap.org/browse/POLICY-2885 Issue-ID: POLICY-2885 Signed-off-by: gregory.hayes Change-Id: I345531d3a7640cc5ad9dbfc367052b9c8cc19387 --- .../apex/plugins/event/protocol/yaml/Apex2YamlEventConverter.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main') 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 e6ee090e4..59c9c21c1 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 @@ -112,10 +112,8 @@ public class Apex2YamlEventConverter implements ApexEventProtocolConverter { try { eventList.add(yamlMap2ApexEvent(eventName, yamlMap)); } catch (final Exception e) { - final String errorString = "Failed to unmarshal YAML event: " + e.getMessage() + ", event=" - + yamlEventString; - LOGGER.warn(errorString, e); - throw new ApexEventException(errorString, e); + throw new ApexEventException("Failed to unmarshal YAML event, event=" + + yamlEventString, e); } // Return the list of events we have unmarshalled -- cgit 1.2.3-korg