generated from pricelees/issue-pr-template
feat: 2af09231 커밋 내용 추가
This commit is contained in:
parent
612bbfbddc
commit
3f5af93817
@ -1,6 +1,7 @@
|
|||||||
package roomescape.common.log
|
package roomescape.common.log
|
||||||
|
|
||||||
import com.zaxxer.hikari.HikariDataSource
|
import com.zaxxer.hikari.HikariDataSource
|
||||||
|
import net.ttddyy.dsproxy.listener.logging.SLF4JLogLevel
|
||||||
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder
|
import net.ttddyy.dsproxy.support.ProxyDataSourceBuilder
|
||||||
import org.springframework.beans.factory.annotation.Qualifier
|
import org.springframework.beans.factory.annotation.Qualifier
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||||
@ -26,7 +27,8 @@ class ProxyDataSourceConfig {
|
|||||||
.name(properties.loggerName)
|
.name(properties.loggerName)
|
||||||
.listener(
|
.listener(
|
||||||
MDCAwareSlowQueryListenerWithoutParams(
|
MDCAwareSlowQueryListenerWithoutParams(
|
||||||
properties.thresholdMs
|
logLevel = SLF4JLogLevel.nullSafeValueOf(properties.logLevel.uppercase()),
|
||||||
|
thresholdMs = properties.thresholdMs
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.buildProxy()
|
.buildProxy()
|
||||||
@ -42,5 +44,6 @@ class ProxyDataSourceConfig {
|
|||||||
@ConfigurationProperties(prefix = "slow-query")
|
@ConfigurationProperties(prefix = "slow-query")
|
||||||
data class SlowQueryProperties(
|
data class SlowQueryProperties(
|
||||||
val loggerName: String,
|
val loggerName: String,
|
||||||
|
val logLevel: String,
|
||||||
val thresholdMs: Long,
|
val thresholdMs: Long,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user