refactor: Servlet Filter에서의 MDC 제거 로직 변경

This commit is contained in:
이상진 2025-09-18 15:29:39 +09:00
parent efb7148215
commit 6b0c9709ed

View File

@ -9,6 +9,7 @@ import org.slf4j.MDC
import org.springframework.web.filter.OncePerRequestFilter import org.springframework.web.filter.OncePerRequestFilter
import org.springframework.web.util.ContentCachingRequestWrapper import org.springframework.web.util.ContentCachingRequestWrapper
import org.springframework.web.util.ContentCachingResponseWrapper import org.springframework.web.util.ContentCachingResponseWrapper
import roomescape.common.util.MdcPrincipalId
private val log: KLogger = KotlinLogging.logger {} private val log: KLogger = KotlinLogging.logger {}
@ -33,7 +34,7 @@ class HttpRequestLoggingFilter(
cachedResponse.copyBodyToResponse() cachedResponse.copyBodyToResponse()
} finally { } finally {
MDC.remove("startTime") MDC.remove("startTime")
MDC.remove("member_id") MdcPrincipalId.clear()
} }
} }
} }