From 418d7273d6d8f6fed2698df89c9910be8498a677 Mon Sep 17 00:00:00 2001 From: st782s Date: Mon, 6 Nov 2017 16:05:26 -0500 Subject: Release new SDK Version Issue: PORTAL-19, PORTAL-135 Includes SDK 2.1 release updates deprecating certain methods to address vulnerabilities Change-Id: Ibf105a0cf3c7d7e89eb05862c54aadfacf575d97 Signed-off-by: st782s --- .../portalsdk/core/logging/aspect/EELFLoggerAspect.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging') diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java index 3ffd0894..0e23a36f 100644 --- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java +++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/logging/aspect/EELFLoggerAspect.java @@ -43,6 +43,7 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.onap.portalsdk.core.util.SystemProperties.SecurityEventTypeEnum; import org.springframework.beans.factory.annotation.Autowired; +import org.onap.portalsdk.core.logging.aspect.MetricsLog; @Aspect @org.springframework.context.annotation.Configuration @@ -108,4 +109,18 @@ public class EELFLoggerAspect { return result; } + + //Metrics Logging + @Pointcut("execution(* *(..))") + public void performMetricsLogging() {} + + @Around("performMetricsLogging() && @within(MetricsLog)") + public Object metricsLoggingAroundClass(ProceedingJoinPoint joinPoint, MetricsLog MetricsLog) throws Throwable { + return this.logAroundMethod(joinPoint, null); + } + + @Around("performMetricsLogging() && @annotation(MetricsLog)") + public Object metricsLoggingAroundMethod(ProceedingJoinPoint joinPoint, MetricsLog MetricsLog) throws Throwable { + return this.logAroundMethod(joinPoint, null); + } } -- cgit 1.2.3-korg