From 156df4c60543946ae392047fd169ba5a0c21a502 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Mon, 7 Nov 2022 08:10:39 +0000 Subject: [PATCH] Update babel dependencies - update dependencies - resolve warning about statically accessing the logger Issue-ID: AAI-3582 Signed-off-by: Fiete Ostkamp Change-Id: Icb80d3880e049e18a6fcbe91d6f1dfd95ebdeef5 --- pom.xml | 60 +++++++++++----------- .../java/org/onap/aai/babel/logging/LogHelper.java | 22 ++++---- 2 files changed, 42 insertions(+), 40 deletions(-) diff --git a/pom.xml b/pom.xml index 75f6ae9..ed6cde1 100644 --- a/pom.xml +++ b/pom.xml @@ -79,37 +79,36 @@ 0.28.0 1.0.0 ${project.build.directory}/${project.artifactId}-${project.version}-build/ - + onap alpine 1.9.0 - 1.5.1 + 1.6.5 1.9.4 - 2.1.21 - 1.2.2 - 1.2.7 - 2.5.15 + 2.7.4 + 1.2.11 + 3.0.13 - 1.21 + 1.22 1.15 - 2.1 - 0.13.3 + 2.1.1 + 0.15.1 org.onap.aai.schema-service 1.9.7 - 3.7 - 1.2.1 + 3.12.0 + 1.6.4 - 1.4.1 + 1.4.5 + 1.6 - 1.8 - - 1.1.1 + 3.1.0 + 1.2.2 yyyyMMdd'T'HHmmss'Z' @@ -117,7 +116,6 @@ - docker @@ -125,7 +123,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + 3.3.0 pre-clean @@ -137,9 +135,9 @@ - org.codehaus.groovy.maven - gmaven-plugin - 1.0 + org.codehaus.gmavenplus + gmavenplus-plugin + 1.13.1 pre-clean @@ -172,8 +170,7 @@ 1.23 - ${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l - + ${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l @ @@ -299,11 +296,12 @@ org.apache.commons commons-lang3 + ${commons.lang3.version} javax.ws.rs javax.ws.rs-api - 2.1 + ${javax.ws.rs.version} org.codehaus.groovy @@ -405,9 +403,9 @@ jaxb-impl - javax.activation - activation - ${javax.activation.version} + jakarta.activation + jakarta.activation-api + ${jakarta.activation.version} @@ -524,7 +522,8 @@ org.codehaus.mojo 1.5.0 - + + Get latest xsd version generate-sources @@ -619,7 +618,7 @@ + whole section --> org.jacoco @@ -767,9 +766,8 @@ sonar-maven-plugin ${sonar.scanner.version} - + - + \ No newline at end of file diff --git a/src/main/java/org/onap/aai/babel/logging/LogHelper.java b/src/main/java/org/onap/aai/babel/logging/LogHelper.java index b9fa351..19ee25b 100644 --- a/src/main/java/org/onap/aai/babel/logging/LogHelper.java +++ b/src/main/java/org/onap/aai/babel/logging/LogHelper.java @@ -22,11 +22,6 @@ package org.onap.aai.babel.logging; import static com.att.eelf.configuration.Configuration.MDC_SERVICE_NAME; -import ch.qos.logback.classic.AsyncAppender; -import ch.qos.logback.core.FileAppender; -import com.att.eelf.configuration.EELFLogger; -import com.att.eelf.configuration.EELFManager; -import com.att.eelf.i18n.EELFResolvableErrorEnum; import java.io.File; import java.text.DateFormat; import java.text.SimpleDateFormat; @@ -34,9 +29,11 @@ import java.util.Date; import java.util.Optional; import java.util.function.BiConsumer; import java.util.function.Consumer; + import javax.servlet.ServletRequest; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response.Status; + import org.apache.commons.lang3.time.StopWatch; import org.onap.aai.babel.request.RequestHeaders; import org.onap.aai.cl.api.LogFields; @@ -46,6 +43,13 @@ import org.onap.aai.cl.mdc.MdcOverride; import org.onap.aai.restclient.client.Headers; import org.slf4j.MDC; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; +import com.att.eelf.i18n.EELFResolvableErrorEnum; + +import ch.qos.logback.classic.AsyncAppender; +import ch.qos.logback.core.FileAppender; + /*- * This Log Helper mimics the interface of a Common Logging Logger * but adds helper methods for audit and metrics logging requirements. @@ -119,10 +123,10 @@ public enum LogHelper implements Logger { /** Our externally advertised service API */ private static final String SERVICE_NAME_VALUE = "AAI-BAS"; - private static final EELFLogger errorLogger = EELFManager.getInstance().getErrorLogger(); - private static final EELFLogger debugLogger = EELFManager.getInstance().getDebugLogger(); - private static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger(); - private static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger(); + private static final EELFLogger errorLogger = EELFManager.getErrorLogger(); + private static final EELFLogger debugLogger = EELFManager.getDebugLogger(); + private static final EELFLogger auditLogger = EELFManager.getAuditLogger(); + private static final EELFLogger metricsLogger = EELFManager.getMetricsLogger(); /** Formatting for timestamps logged as Strings (from the MDC) */ private DateFormat timestampFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); -- 2.16.6