generated from pricelees/issue-pr-template
[#28] 쿠버네티스 환경 배포 #29
@ -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,
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user