feat: 2af09231 커밋 내용 추가

This commit is contained in:
이상진 2025-08-02 15:57:32 +09:00
parent 612bbfbddc
commit 3f5af93817

View File

@ -1,6 +1,7 @@
package roomescape.common.log
import com.zaxxer.hikari.HikariDataSource
import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.boot.context.properties.ConfigurationProperties
@ -26,7 +27,8 @@ class ProxyDataSourceConfig {
.name(properties.loggerName)
.listener(
MDCAwareSlowQueryListenerWithoutParams(
properties.thresholdMs
logLevel = SLF4JLogLevel.nullSafeValueOf(properties.logLevel.uppercase()),
thresholdMs = properties.thresholdMs
)
)
.buildProxy()
@ -42,5 +44,6 @@ class ProxyDataSourceConfig {
@ConfigurationProperties(prefix = "slow-query")
data class SlowQueryProperties(
val loggerName: String,
val logLevel: String,
val thresholdMs: Long,
)