diff options
author | gregory.hayes <gregory.hayes@est.tech> | 2020-12-09 20:42:33 +0000 |
---|---|---|
committer | gregory.hayes <gregory.hayes@est.tech> | 2020-12-17 16:23:57 +0000 |
commit | a3979b8a14f6e67de406b29c3e0ad0c516c3bc54 (patch) | |
tree | 13f0b33e9d5ace049fa5b99b036aed7df557c712 /plugins/plugins-event/plugins-event-carrier | |
parent | e267120c204303088f3c15e580a5e1a364e014f5 (diff) |
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 <gregory.hayes@est.tech>
Change-Id: I345531d3a7640cc5ad9dbfc367052b9c8cc19387
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier')
2 files changed, 2 insertions, 3 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java index 9fbc36116..88980762f 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java @@ -179,7 +179,6 @@ public class ApexJmsConsumer extends ApexPluginsEventConsumer implements Message eventReceiver.receiveEvent(new Properties(), jmsMessage); } catch (final Exception e) { final String errorMessage = "failed to receive message from JMS"; - LOGGER.warn(errorMessage, e); throw new ApexEventRuntimeException(errorMessage, e); } } diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java index 39d0023d2..80ccda729 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java @@ -160,10 +160,10 @@ public class ApexRestServerConsumer extends ApexPluginsEventConsumer { // Send the event into Apex eventReceiver.receiveEvent(executionId, new Properties(), event); } catch (final Exception e) { - final String errorMessage = "error receiving events on event consumer " + name + ", " + e.getMessage(); + final String errorMessage = "error receiving events on event consumer " + name; LOGGER.warn(errorMessage, e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()) - .entity("{'errorMessage', '" + errorMessage + "'}").build(); + .entity("{'errorMessage', '" + errorMessage + ", " + e.getMessage() + "'}").build(); } final SynchronousEventCache synchronousEventCache = |