From a8618399833e9e2c2cfdd214058234a1395f8361 Mon Sep 17 00:00:00 2001 From: Kishore Reddy Dwaram Date: Fri, 25 Sep 2020 16:45:02 -0400 Subject: changes done to support logs format Issue-ID: PORTAL-1008 Signed-off-by: Kishore Reddy Dwaram Change-Id: I20f110c0fd48d7258f86f08501bad81244d3db20 --- .../org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java') diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java index 6a5fe469..8e21fd2c 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAdvice.java @@ -37,7 +37,6 @@ */ package org.onap.portalsdk.core.logging.aspect; -import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID; import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN; import static com.att.eelf.configuration.Configuration.MDC_SERVER_IP_ADDRESS; import static com.att.eelf.configuration.Configuration.MDC_SERVICE_NAME; @@ -50,8 +49,6 @@ import java.util.UUID; import javax.servlet.http.HttpServletRequest; import org.onap.portalsdk.core.domain.User; -import org.onap.portalsdk.core.exception.SessionExpiredException; -import org.onap.portalsdk.core.logging.format.AlarmSeverityEnum; import org.onap.portalsdk.core.logging.format.AuditLogFormatter; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.portalsdk.core.logging.logic.LoggerProperties; @@ -113,10 +110,9 @@ public class EELFLoggerAdvice { } // Initialize Request defaults only for controller methods. - MDC.put(MDC_SERVICE_NAME, SystemProperties.getProperty(SystemProperties.APPLICATION_NAME)); + MDC.put(MDC_SERVICE_NAME, LoggerProperties.getPropertyValue(LoggerProperties.APP_NAME)); MDC.put(MDC_SERVER_FQDN, InetAddress.getLocalHost().getHostName()); MDC.put(MDC_SERVER_IP_ADDRESS, InetAddress.getLocalHost().getHostAddress()); - MDC.put(MDC_INSTANCE_UUID, LoggerProperties.getProperty(LoggerProperties.INSTANCE_UUID)); MDC.put(className + methodName + SystemProperties.METRICSLOG_BEGIN_TIMESTAMP, getCurrentDateTimeUTC()); MDC.put(SystemProperties.METRICSLOG_BEGIN_TIMESTAMP, getCurrentDateTimeUTC()); MDC.put(SystemProperties.AUDITLOG_BEGIN_TIMESTAMP, getCurrentDateTimeUTC()); @@ -207,7 +203,7 @@ public class EELFLoggerAdvice { if (MDC.get(SystemProperties.PARTNER_NAME) == null|| MDC.get(SystemProperties.PARTNER_NAME).isEmpty()){ MDC.put(SystemProperties.PARTNER_NAME, "Unknown"); } - MDC.put(MDC_SERVICE_NAME, SystemProperties.getProperty(SystemProperties.APPLICATION_NAME)); + MDC.put(MDC_SERVICE_NAME, LoggerProperties.getPropertyValue(LoggerProperties.APP_NAME)); MDC.put(SystemProperties.STATUS_CODE, result); -- cgit 1.2.3-korg