Fix sonar issues and reporting 00/106100/2
authorefiacor <fiachra.corcoran@est.tech>
Thu, 16 Apr 2020 13:59:07 +0000 (14:59 +0100)
committerefiacor <fiachra.corcoran@est.tech>
Thu, 16 Apr 2020 14:03:50 +0000 (15:03 +0100)
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I29aa54e62d2dfaa6eddb16eb67c325254dfc0e06
Issue-ID: DMAAP-1426

18 files changed:
datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/NodeServlet.java
datarouter-prov/pom.xml
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/impl/package.html
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/authz/package.html
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/StatisticsServlet.java
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/package.html
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/package.html
datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/package.html
datarouter-subscriber/pom.xml
datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SampleSubscriberServlet.java
datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberMain.java
datarouter-subscriber/src/main/java/org/onap/dmaap/datarouter/subscriber/SubscriberProps.java
datarouter-subscriber/src/main/resources/docker/Dockerfile
datarouter-subscriber/src/main/resources/log4j.properties [deleted file]
datarouter-subscriber/src/main/resources/logback.xml [new file with mode: 0644]
datarouter-subscriber/src/test/resources/log4j.properties [deleted file]
datarouter-subscriber/src/test/resources/logback-test.xml [new file with mode: 0644]
pom.xml

index 388b679..0d03068 100644 (file)
@@ -424,7 +424,9 @@ public class NodeServlet extends HttpServlet {
                     mw.write("X-DMAAP-DR-ROUTING\t" + t.getRouting() + "\n");
                 }
                 mw.close();
-                meta.renameTo(new File(dbase + ".M"));
+                if (!meta.renameTo(new File(dbase + ".M"))) {
+                    eelfLogger.error("Rename of file " + dbase + " failed.");
+                }
             }
             resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
             try {
index 54f6d85..223261c 100755 (executable)
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.dom4j</groupId>
-            <artifactId>dom4j</artifactId>
-            <version>2.1.1</version>
-        </dependency>
         <dependency>
             <groupId>org.sonatype.http-testing-harness</groupId>
             <artifactId>junit-runner</artifactId>
index 0d051db..58055ea 100644 (file)
@@ -1,4 +1,4 @@
-#-------------------------------------------------------------------------------\r
+<!------------------------------------------------------------------------------\r
 # ============LICENSE_START==================================================\r
 # * org.onap.dmaap\r
 # * ===========================================================================\r
 # *\r
 # * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
 # *\r
-#-------------------------------------------------------------------------------\r
+#------------------------------------------------------------------------------->\r
 \r
-<html>\r
+<!DOCTYPE html>\r
+<html lang="en">\r
 <head>\r
+  <title>DMaaP DR Authz Impl package</title>\r
 </head>\r
 <body>\r
 <p>\r
@@ -55,8 +57,6 @@ class defined in this package, passing it an instance of the <code>ProvDataProvi
 implementation.\r
 </li>\r
 </ul>\r
-</p>\r
-<p>\r
 Example:\r
 <pre>\r
 <code>\r
index 3b48450..be7e333 100644 (file)
@@ -1,4 +1,4 @@
-#-------------------------------------------------------------------------------\r
+<!-------------------------------------------------------------------------------\r
 # ============LICENSE_START==================================================\r
 # * org.onap.dmaap\r
 # * ===========================================================================\r
 # *\r
 # * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
 # *\r
-#-------------------------------------------------------------------------------\r
+#------------------------------------------------------------------------------->\r
 \r
-<html>\r
+<!DOCTYPE html>\r
+<html lang="en">\r
 <head>\r
+  <title>DMaaP DR Authz package</title>\r
 </head>\r
 <body>\r
 <p>\r
index 76991ca..c564db8 100755 (executable)
@@ -32,6 +32,8 @@ import java.sql.ResultSet;
 import java.sql.SQLException;\r
 import java.text.ParseException;\r
 import java.text.SimpleDateFormat;\r
+import java.time.LocalDateTime;\r
+import java.time.format.DateTimeFormatter;\r
 import java.util.Calendar;\r
 import java.util.Date;\r
 import java.util.HashMap;\r
@@ -511,10 +513,9 @@ public class StatisticsServlet extends BaseServlet {
                 ResultSet rs = ps.executeQuery()) {\r
                 if ("csv".equals(outputType)) {\r
                     resp.setContentType("application/octet-stream");\r
-                    Date date = new Date();\r
-                    SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-YYYY HH:mm:ss");\r
+                    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm:ss");\r
                     resp.setHeader("Content-Disposition",\r
-                        "attachment; filename=\"result:" + dateFormat.format(date) + ".csv\"");\r
+                        "attachment; filename=\"result:" + LocalDateTime.now().format(formatter) + ".csv\"");\r
                     eventlogger.info("Generating CSV file from Statistics resultset");\r
                     rsToCSV(rs, out);\r
                 } else {\r
index c33902c..f05b765 100644 (file)
@@ -1,4 +1,4 @@
-#-------------------------------------------------------------------------------\r
+<!-------------------------------------------------------------------------------\r
 # ============LICENSE_START==================================================\r
 # * org.onap.dmaap\r
 # * ===========================================================================\r
 # *\r
 # * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
 # *\r
-#-------------------------------------------------------------------------------\r
+#------------------------------------------------------------------------------->\r
 \r
-<html>\r
+<!DOCTYPE html>\r
+<html lang="en">\r
+<head>\r
+  <title>DMaaP DR Provisioning Beans</title>\r
+</head>\r
 <body>\r
 <p>\r
 This package provides beans to represent the basic provisioning objects of the Data Router application.\r
-These objects are defined by the document <b>Data Router Release 1 Provisioning API</b> <i>Version 1.2</i>.\r
+These objects are defined by the document <strong>Data Router Release 1 Provisioning API</strong> <em>Version 1.2</em>.\r
 </p>\r
 </body>\r
 </html>\r
index af08391..c6263e1 100644 (file)
@@ -1,4 +1,4 @@
-#-------------------------------------------------------------------------------
+<!-------------------------------------------------------------------------------
 # ============LICENSE_START==================================================
 # * org.onap.dmaap
 # * ===========================================================================
 # *
 # * ECOMP is a trademark and service mark of AT&T Intellectual Property.
 # *
-#-------------------------------------------------------------------------------
+#------------------------------------------------------------------------------->
 
-<html>
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <title>DMaaP DR Provisioning Servlets</title>
+</head>
 <body>
 <p>
 This package provides the servlets used by the provisioning server for the Data Router application.
-URLs are from the document <b>URLs for DR Release 1</b> <i>Version 1.2</i>.
+URLs are from the document <strong>URLs for DR Release 1</strong> <em>Version 1.2</em>.
 </p>
 <div class="contentContainer">
-<table class="packageSummary" border="0" cellpadding="3" cellspacing="0">
+<table class="packageSummary" border="0">
 <caption><span>URL Path Summary</span><span class="tabEnd">&nbsp;</span></caption>
 <tr class="altColor">
-    <th class="colFirst">URL Path</th>
-    <th class="colOne">Symbolic Name</th>
-    <th class="colLast">Servlet Name</th>
-    <th class="colLast" colspan="4">Allowed Methods</th>
+    <th class="colFirst" scope="col">URL Path</th>
+    <th class="colOne" scope="col">Symbolic Name</th>
+    <th class="colLast" scope="col">Servlet Name</th>
+    <th class="colLast" colspan="4" scope="col">Allowed Methods</th>
 </tr>
 <tr>
     <td class="colFirst" class="colOne">/</td>
index 09517fe..a110f13 100644 (file)
@@ -1,4 +1,4 @@
-#-------------------------------------------------------------------------------\r
+<!-------------------------------------------------------------------------------\r
 # ============LICENSE_START==================================================\r
 # * org.onap.dmaap\r
 # * ===========================================================================\r
 # *\r
 # * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
 # *\r
-#-------------------------------------------------------------------------------\r
+#------------------------------------------------------------------------------->\r
 \r
-<html>\r
+<!DOCTYPE html>\r
+<html lang="en">\r
+<head>\r
+  <title>DMaaP DR Provisioning Utils</title>\r
+</head>\r
 <body>\r
 <p>\r
 This package provide various helper classes used by the provisioning server.\r
index 9390050..2d97b17 100755 (executable)
             <groupId>commons-codec</groupId>
             <artifactId>commons-codec</artifactId>
         </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>
             <artifactId>commons-io</artifactId>
         </dependency>
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
-            <version>1.2.17</version>
-            <scope>compile</scope>
+            <groupId>com.att.eelf</groupId>
+            <artifactId>eelf-core</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>powermock-api-mockito</artifactId>
+                    <groupId>org.powermock</groupId>
+                </exclusion>
+            </exclusions>
         </dependency>
     </dependencies>
     <profiles>
                 <filtering>true</filtering>
                 <includes>
                     <include>**/*.properties</include>
+                    <include>**/logback.xml</include>
                 </includes>
             </resource>
         </resources>
index 993d325..34a844c 100644 (file)
@@ -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;
 
index 2e02c88..6894ddc 100644 (file)
@@ -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.
index ba7aa7a..49cad50 100644 (file)
 
 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;
index 20a2ca2..81c9dcc 100644 (file)
@@ -36,7 +36,7 @@ RUN chmod 0700 startup.sh
 ENTRYPOINT ["sh", "startup.sh"]
 
 RUN groupadd -g 1001 onap \
-    && useradd -u 1000 datarouter -g onap \
-    && chown -R datarouter:onap /opt/
+    && useradd -u 1000 dradmin -g onap \
+    && chown -R dradmin:onap /opt/ /var/
 
-USER datarouter
\ No newline at end of file
+USER dradmin
\ No newline at end of file
diff --git a/datarouter-subscriber/src/main/resources/log4j.properties b/datarouter-subscriber/src/main/resources/log4j.properties
deleted file mode 100644 (file)
index bb66ef4..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#-------------------------------------------------------------------------------
-# ============LICENSE_START==================================================
-# * org.onap.dmaap
-# * ===========================================================================
-# * Copyright � 2017 AT&T Intellectual Property. All rights reserved.
-# * ===========================================================================
-# * Licensed under the Apache License, Version 2.0 (the "License");
-# * you may not use this file except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-#  *      http://www.apache.org/licenses/LICENSE-2.0
-# *
-#  * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# * ============LICENSE_END====================================================
-# *
-# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
-# *
-#-------------------------------------------------------------------------------
-
-log4j.rootLogger=info,Root
-
-log4j.appender.Root=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.Root.file=/opt/app/subscriber/logs/subscriber.log
-log4j.appender.Root.datePattern='.'yyyyMMdd
-log4j.appender.Root.append=true
-log4j.appender.Root.layout=org.apache.log4j.PatternLayout
-log4j.appender.Root.layout.ConversionPattern=%d %p %t %m%n
diff --git a/datarouter-subscriber/src/main/resources/logback.xml b/datarouter-subscriber/src/main/resources/logback.xml
new file mode 100644 (file)
index 0000000..24ffe67
--- /dev/null
@@ -0,0 +1,112 @@
+<!--
+  ============LICENSE_START==================================================
+  * org.onap.dmaap
+  * ===========================================================================
+  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+  * ===========================================================================
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+   *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+   * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  * ============LICENSE_END====================================================
+  *
+  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  *
+-->
+<configuration scan="true" scanPeriod="3 seconds" debug="false">
+  <property name="logDir" value="/var/log/onap/datarouter" />
+  <property name="generalLogName" value="application" />
+  <property name="errorLogName" value="errors" />
+  <property name="defaultPattern"    value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{InvocationId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%msg%n" />
+  <property name="logDirectory" value="${logDir}" />
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>${defaultPattern}</pattern>
+    </encoder>
+  </appender>
+
+  <!-- ============================================================================ -->
+  <!-- EELF Appenders -->
+  <!-- ============================================================================ -->
+
+  <!-- The EELFAppender is used to record events to the general application
+    log -->
+
+
+  <appender name="EELF"
+    class="ch.qos.logback.core.rolling.RollingFileAppender">
+    <file>${logDirectory}/${generalLogName}.log</file>
+    <rollingPolicy
+      class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+      <fileNamePattern>${logDirectory}/${generalLogName}.%i.log.zip
+      </fileNamePattern>
+      <minIndex>1</minIndex>
+      <maxIndex>9</maxIndex>
+    </rollingPolicy>
+    <triggeringPolicy
+      class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+      <maxFileSize>5MB</maxFileSize>
+    </triggeringPolicy>
+    <encoder>
+      <pattern>${defaultPattern}</pattern>
+    </encoder>
+  </appender>
+
+  <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
+    <queueSize>256</queueSize>
+    <appender-ref ref="EELF" />
+  </appender>
+
+  <appender name="EELFError"
+    class="ch.qos.logback.core.rolling.RollingFileAppender">
+    <file>${logDirectory}/${errorLogName}.log</file>
+    <filter class="ch.qos.logback.classic.filter.LevelFilter">
+      <level>ERROR</level>
+      <onMatch>ACCEPT</onMatch>
+      <onMismatch>DENY</onMismatch>
+    </filter>
+    <rollingPolicy
+      class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+      <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
+      </fileNamePattern>
+      <minIndex>1</minIndex>
+      <maxIndex>9</maxIndex>
+    </rollingPolicy>
+    <triggeringPolicy
+      class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+      <maxFileSize>5MB</maxFileSize>
+    </triggeringPolicy>
+    <encoder>
+      <pattern>${defaultPattern}</pattern>
+    </encoder>
+  </appender>
+
+  <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+    <queueSize>256</queueSize>
+    <appender-ref ref="EELFError"/>
+  </appender>
+
+  <!-- ============================================================================ -->
+  <!--  EELF loggers -->
+  <!-- ============================================================================ -->
+  <logger name="com.att.eelf" level="info" additivity="false">
+    <appender-ref ref="asyncEELF" />
+  </logger>
+
+  <logger name="com.att.eelf.error" level="error" additivity="false">
+    <appender-ref ref="asyncEELFError" />
+  </logger>
+
+  <root level="INFO">
+    <appender-ref ref="asyncEELF" />
+    <appender-ref ref="asyncEELFError" />
+  </root>
+
+</configuration>
diff --git a/datarouter-subscriber/src/test/resources/log4j.properties b/datarouter-subscriber/src/test/resources/log4j.properties
deleted file mode 100644 (file)
index b8d349e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#-------------------------------------------------------------------------------
-# ============LICENSE_START==================================================
-# * org.onap.dmaap
-# * ===========================================================================
-# * Copyright � 2017 AT&T Intellectual Property. All rights reserved.
-# * ===========================================================================
-# * Licensed under the Apache License, Version 2.0 (the "License");
-# * you may not use this file except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-#  *      http://www.apache.org/licenses/LICENSE-2.0
-# *
-#  * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# * ============LICENSE_END====================================================
-# *
-# * ECOMP is a trademark and service mark of AT&T Intellectual Property.
-# *
-#-------------------------------------------------------------------------------
-
-log4j.rootLogger=info,Root
-
-log4j.appender.Root=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.Root.file=./logs/subscriber.log
-log4j.appender.Root.datePattern='.'yyyyMMdd
-log4j.appender.Root.append=true
-log4j.appender.Root.layout=org.apache.log4j.PatternLayout
-log4j.appender.Root.layout.ConversionPattern=%d %p %t %m%n
diff --git a/datarouter-subscriber/src/test/resources/logback-test.xml b/datarouter-subscriber/src/test/resources/logback-test.xml
new file mode 100644 (file)
index 0000000..7639050
--- /dev/null
@@ -0,0 +1,112 @@
+<!--
+  ============LICENSE_START==================================================
+  * org.onap.dmaap
+  * ===========================================================================
+  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+  * ===========================================================================
+  * Licensed under the Apache License, Version 2.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+   *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+   * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  * ============LICENSE_END====================================================
+  *
+  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+  *
+-->
+<configuration scan="true" scanPeriod="3 seconds" debug="false">
+  <property name="logDir" value="logs/EELF" />
+  <property name="generalLogName" value="application" />
+  <property name="errorLogName" value="errors" />
+  <property name="defaultPattern"    value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{InvocationId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%msg%n" />
+  <property name="logDirectory" value="${logDir}" />
+  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>${defaultPattern}</pattern>
+    </encoder>
+  </appender>
+
+  <!-- ============================================================================ -->
+  <!-- EELF Appenders -->
+  <!-- ============================================================================ -->
+
+  <!-- The EELFAppender is used to record events to the general application
+    log -->
+
+
+  <appender name="EELF"
+    class="ch.qos.logback.core.rolling.RollingFileAppender">
+    <file>${logDirectory}/${generalLogName}.log</file>
+    <rollingPolicy
+      class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+      <fileNamePattern>${logDirectory}/${generalLogName}.%i.log.zip
+      </fileNamePattern>
+      <minIndex>1</minIndex>
+      <maxIndex>9</maxIndex>
+    </rollingPolicy>
+    <triggeringPolicy
+      class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+      <maxFileSize>5MB</maxFileSize>
+    </triggeringPolicy>
+    <encoder>
+      <pattern>${defaultPattern}</pattern>
+    </encoder>
+  </appender>
+
+  <appender name="asyncEELF" class="ch.qos.logback.classic.AsyncAppender">
+    <queueSize>256</queueSize>
+    <appender-ref ref="EELF" />
+  </appender>
+
+  <appender name="EELFError"
+    class="ch.qos.logback.core.rolling.RollingFileAppender">
+    <file>${logDirectory}/${errorLogName}.log</file>
+    <filter class="ch.qos.logback.classic.filter.LevelFilter">
+        <level>ERROR</level>
+        <onMatch>ACCEPT</onMatch>
+        <onMismatch>DENY</onMismatch>
+    </filter>
+    <rollingPolicy
+      class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+      <fileNamePattern>${logDirectory}/${errorLogName}.%i.log.zip
+      </fileNamePattern>
+      <minIndex>1</minIndex>
+      <maxIndex>9</maxIndex>
+    </rollingPolicy>
+    <triggeringPolicy
+      class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
+      <maxFileSize>5MB</maxFileSize>
+    </triggeringPolicy>
+    <encoder>
+      <pattern>${defaultPattern}</pattern>
+    </encoder>
+  </appender>
+
+  <appender name="asyncEELFError" class="ch.qos.logback.classic.AsyncAppender">
+    <queueSize>256</queueSize>
+    <appender-ref ref="EELFError"/>
+  </appender>
+
+  <!-- ============================================================================ -->
+  <!--  EELF loggers -->
+  <!-- ============================================================================ -->
+  <logger name="com.att.eelf" level="info" additivity="false">
+    <appender-ref ref="asyncEELF" />
+  </logger>
+
+     <logger name="com.att.eelf.error" level="error" additivity="false">
+          <appender-ref ref="asyncEELFError" />
+      </logger>
+
+  <root level="DEBUG">
+    <appender-ref ref="asyncEELF" />
+    <appender-ref ref="asyncEELFError" />
+  </root>
+
+</configuration>
diff --git a/pom.xml b/pom.xml
index 0f2ebfb..a72ed46 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
                         <exclude>IntegrationSuite.java</exclude>
                     </excludes>
                     <argLine>
-                        --illegal-access=permit
+                        ${surefireArgLine} --illegal-access=permit
                     </argLine>
                 </configuration>
             </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-javadoc-plugin</artifactId>
-                    <version>3.0.1</version>
+                    <version>3.2.0</version>
                     <configuration>
                         <failOnError>false</failOnError>
                     </configuration>
                         </execution>
                     </executions>
                 </plugin>
-                <plugin>
-                    <groupId>org.jacoco</groupId>
-                    <artifactId>jacoco-maven-plugin</artifactId>
-                    <executions>
-                        <execution>
-                            <id>prepare-agent</id>
-                            <goals>
-                                <goal>prepare-agent</goal>
-                            </goals>
-                        </execution>
-                        <execution>
-                            <id>report</id>
-                            <goals>
-                                <goal>report</goal>
-                            </goals>
-                            <configuration>
-                                <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
-                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
-                            </configuration>
-                        </execution>
-                    </executions>
-                </plugin>
             </plugins>
         </pluginManagement>
     </build>