[P6Spy 업데이트] P6Spy Spring Boot Starter 버전을 1.12.0으로 업데이트하고, SQL 로깅 포맷 설정을 spy.properties 파일로 이동하여 기본 설정을 추가함. application.properties에서 불필요한 설정 제거.

This commit is contained in:
2025-09-02 11:03:50 +09:00
parent e2025621d6
commit 3972a77c85
3 changed files with 13 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ dependencies {
annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
// p6spy
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0'
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.12.0'
// SpringDoc OpenAPI (Swagger)
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9'

View File

@@ -86,7 +86,6 @@ logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %m
# P6Spy 설정 (SQL 로깅)
# ========================================
decorator.datasource.p6spy.enable-logging=true
decorator.datasource.p6spy.log-format=%(sqlSingleLine)
# ========================================
# JWT 설정

View File

@@ -0,0 +1,12 @@
##################################################################
# P6Spy 기본 설정
##################################################################
appender=com.p6spy.engine.spy.appender.Slf4JLogger
logMessageFormat=com.p6spy.engine.spy.appender.CustomLineFormat
logLevel=info
##################################################################
# SQL 포맷
##################################################################
customLogMessageFormat=%(currentTime) | %(executionTime) ms | %(category) | connection %(connectionId) | %(sqlSingleLine)
excludecategories=info,debug,result,commit,resultset