From 35520060da918846c16d7ed112781ccb5cee2c5a Mon Sep 17 00:00:00 2001 From: LimHyunwoo <81962309+imenuuu@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:16:35 +0900 Subject: [PATCH] refactor : LogAspect HealthCheck ignore --- .../java/com/example/wineyapi/common/aop/LogAspect.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Winey-API/src/main/java/com/example/wineyapi/common/aop/LogAspect.java b/Winey-API/src/main/java/com/example/wineyapi/common/aop/LogAspect.java index 03431555..dc9fbaae 100644 --- a/Winey-API/src/main/java/com/example/wineyapi/common/aop/LogAspect.java +++ b/Winey-API/src/main/java/com/example/wineyapi/common/aop/LogAspect.java @@ -95,9 +95,11 @@ public Object calculateApiMs(ProceedingJoinPoint joinPoint) throws Throwable{ try{ return joinPoint.proceed(); } finally { - long finish = System.currentTimeMillis(); - long timeMs = finish - start; - log.info("END: {} {}ms", method, timeMs); + if(IGNORE_METHODS.contains(method)) { + long finish = System.currentTimeMillis(); + long timeMs = finish - start; + log.info("END: {} {}ms", method, timeMs); + } } }