Skip to content

Commit

Permalink
refactor: MDC 의존성 변경 jboos -> sl4j
Browse files Browse the repository at this point in the history
  • Loading branch information
belljun3395 committed Jul 8, 2024
1 parent 340c402 commit 62e1197
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/main/kotlin/com/few/api/web/filter/MDCFilter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import jakarta.servlet.ServletRequest
import jakarta.servlet.ServletResponse
import jakarta.servlet.http.HttpServletRequest
import org.apache.commons.lang3.RandomStringUtils
import org.jboss.logging.MDC
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.slf4j.MDC
import org.springframework.http.HttpHeaders
import org.springframework.stereotype.Component

Expand Down Expand Up @@ -38,7 +38,7 @@ class MDCFilter(private val mapper: ObjectMapper) : Filter {
val requestEndTime = System.currentTimeMillis()
val elapsedTime = requestEndTime - requestStartTime
MDC.put("ElapsedTime", elapsedTime.toString() + "ms")
log.info("{}", mapper.writeValueAsString(MDC.getMap()))
log.info("{}", mapper.writeValueAsString(MDC.getCopyOfContextMap()))
MDC.clear()
}
}

0 comments on commit 62e1197

Please sign in to comment.