aboutsummaryrefslogtreecommitdiffstats
path: root/datarouter-subscriber/src/main/java/org/onap
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2020-04-16 14:59:07 +0100
committerefiacor <fiachra.corcoran@est.tech>2020-04-16 15:03:50 +0100
commit5906de2465975e42e4983abe411f30fa16050fdf (patch)
tree81bf98d48c6e09f9d545f993bcd9416c510ea109 /datarouter-subscriber/src/main/java/org/onap
parent8552e04175c7091d0d748e0c0f4b14a0d9321b40 (diff)
Fix sonar issues and reporting
Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I29aa54e62d2dfaa6eddb16eb67c325254dfc0e06 Issue-ID: DMAAP-1426
Diffstat (limited to 'datarouter-subscriber/src/main/java/org/onap')
-rw-r--r--datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java5
-rw-r--r--datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberMain.java5
-rw-r--r--datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java7
3 files changed, 10 insertions, 7 deletions
diff --git a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java
index 993d3253..34a844c6 100644
--- a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java
+++ b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java
@@ -23,6 +23,8 @@
package org.onap.dmaap.datarouter.subscriber;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -37,12 +39,11 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.binary.Base64;
-import org.apache.log4j.Logger;
public class SampleSubscriberServlet extends HttpServlet {
- private static Logger logger = Logger.getLogger("org.onap.dmaap.datarouter.subscriber.SampleSubscriberServlet");
+ private static EELFLogger logger = EELFManager.getInstance().getLogger(SampleSubscriberServlet.class);
private static String outputDirectory;
private static String basicAuth;
diff --git a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberMain.java b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberMain.java
index 2e02c88c..6894ddcf 100644
--- a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberMain.java
+++ b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberMain.java
@@ -23,8 +23,9 @@
package org.onap.dmaap.datarouter.subscriber;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import java.util.Arrays;
-import org.apache.log4j.Logger;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.HttpConfiguration;
@@ -40,7 +41,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
public class SubscriberMain {
- private static Logger logger = Logger.getLogger("org.onap.dmaap.datarouter.subscriber.SubscriberMain");
+ private static EELFLogger logger = EELFManager.getInstance().getLogger(SubscriberMain.class);
/**
* Main class for Subscriber.
diff --git a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java
index ba7aa7af..49cad503 100644
--- a/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java
+++ b/datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java
@@ -23,15 +23,16 @@
package org.onap.dmaap.datarouter.subscriber;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
import java.io.IOException;
import java.util.Properties;
-import org.apache.log4j.Logger;
public class SubscriberProps {
private static SubscriberProps instance = null;
- private static Logger subLogger = Logger.getLogger("org.onap.dmaap.datarouter.subscriber.internal");
+ private static EELFLogger logger = EELFManager.getInstance().getLogger(SubscriberProps.class);
private Properties properties;
private SubscriberProps(String propsPath) throws IOException {
@@ -50,7 +51,7 @@ public class SubscriberProps {
try {
instance = new SubscriberProps(propsPath);
} catch (IOException ioe) {
- subLogger.error("IO Exception: " + ioe.getMessage(), ioe);
+ logger.error("IO Exception: " + ioe.getMessage(), ioe);
}
}
return instance;