From 4b8458bdd03bec835029efac0e4d6709173fda0c Mon Sep 17 00:00:00 2001 From: Dushyant Singh Thakur Date: Thu, 8 Feb 2018 15:47:33 +0530 Subject: sonar critical for errorhandling Either log or rethrow the exception Sonar Link: https://sonar.onap.org/component_issues?id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr#resolved=false|severities=CRITICAL|assignees=dthakur Location: src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java Line No-163 Change-Id: I731cb00d4a9fe6591a3f101072f63668bea6e574 Issue-ID: DMAAP-274 Signed-off-by: Dushyant Singh Thakur --- .../com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/att/nsa') diff --git a/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java b/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java index 431163e..58cedce 100644 --- a/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java +++ b/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java @@ -161,9 +161,9 @@ public class DMaaPMetricsSender implements Runnable { o.put("transactionEnabled", false); fCambria.send(fHostname, o.toString()); } catch (JSONException e) { - log.warn("Error posting metrics to Cambria: " + e.getMessage()); + log.error("Error posting metrics to Cambria at send(): " + e); } catch (IOException e) { - log.warn("Error posting metrics to Cambria: " + e.getMessage()); + log.error("Error posting metrics to Cambria at send(): " + e); } } -- cgit 1.2.3-korg