X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fpolicyagent%2Faspect%2FLogAspect.java;h=93b2ec0dcdaa340b86353910fecdd340ef879570;hb=cd4d0e141b1e4ab07e8c89da2e002378826b7111;hp=f4419b76a7a61559352d3cddf9679d43a530c93e;hpb=e2ac0dcf30eaf828a7c7bbd722730410f4110030;p=nonrtric.git diff --git a/policy-agent/src/main/java/org/oransc/policyagent/aspect/LogAspect.java b/policy-agent/src/main/java/org/oransc/policyagent/aspect/LogAspect.java index f4419b76..93b2ec0d 100644 --- a/policy-agent/src/main/java/org/oransc/policyagent/aspect/LogAspect.java +++ b/policy-agent/src/main/java/org/oransc/policyagent/aspect/LogAspect.java @@ -40,23 +40,23 @@ public class LogAspect { @Around("execution(* org.oransc.policyagent..*(..)))") public void executimeTime(ProceedingJoinPoint proceedingJoinPoint) throws Throwable { - MethodSignature methodSignature = (MethodSignature) proceedingJoinPoint.getSignature(); - String className = methodSignature.getDeclaringType().getSimpleName(); - String methodName = methodSignature.getName(); final StopWatch stopWatch = new StopWatch(); stopWatch.start(); proceedingJoinPoint.proceed(); stopWatch.stop(); + MethodSignature methodSignature = (MethodSignature) proceedingJoinPoint.getSignature(); + String className = methodSignature.getDeclaringType().getSimpleName(); + String methodName = methodSignature.getName(); logger.trace("Execution time of {}.{}: {} ms", className, methodName, stopWatch.getTotalTimeMillis()); } @Before("execution(* org.oransc.policyagent..*(..)))") - public void entryLog(final JoinPoint joinPoint) throws Throwable { + public void entryLog(final JoinPoint joinPoint) { logger.trace("Entering method: {}", joinPoint.getSignature().getName()); } @After("execution(* org.oransc.policyagent..*(..)))") - public void exitLog(final JoinPoint joinPoint) throws Throwable { + public void exitLog(final JoinPoint joinPoint) { logger.trace("Exiting method: {}", joinPoint.getSignature().getName()); }