From 2f6e13e304a5fdb6100ebb7be0a4a4ba0a7d88f5 Mon Sep 17 00:00:00 2001 From: rama-huawei Date: Thu, 14 Sep 2017 18:08:56 +0530 Subject: Fix for Sonar critical issues DCAEGEN2-93 Change-Id: I8d7d76191f35b4fa67f03b0516b7cdd15f0f80c4 Signed-off-by: rama-huawei --- src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java | 1 + .../java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java b/src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java index 8e1c0e0..5e6825c 100644 --- a/src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java +++ b/src/main/java/com/att/nsa/mr/test/clients/SampleConsumer.java @@ -82,6 +82,7 @@ public class SampleConsumer { catch ( Exception x ) { System.err.println ( x.getClass().getName () + ": " + x.getMessage () ); + LOG.error("exception: ", x); } } } diff --git a/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java b/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java index 3a131a0..5ae36d2 100644 --- a/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java +++ b/src/main/java/com/att/nsa/mr/test/clients/SimpleExampleConsumer.java @@ -22,13 +22,14 @@ package com.att.nsa.mr.test.clients; - - import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.util.Properties; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.att.nsa.mr.client.MRClientFactory; import com.att.nsa.mr.client.MRConsumer; @@ -40,6 +41,7 @@ public class SimpleExampleConsumer static FileReader routeReader=null; public static void main ( String[] args ) { + final Logger LOG = LoggerFactory.getLogger(SimpleExampleConsumer.class); long count = 0; long nextReport = 5000; @@ -81,6 +83,7 @@ public class SimpleExampleConsumer catch ( Exception x ) { System.err.println ( x.getClass().getName () + ": " + x.getMessage () ); + LOG.error("exception: ", x); } } } -- cgit 1.2.3-korg