[P6Spy 업데이트] P6Spy Spring Boot Starter 버전을 1.12.0으로 업데이트하고, SQL 로깅 포맷 설정을 spy.properties 파일로 이동하여 기본 설정을 추가함. application.properties에서 불필요한 설정 제거.
This commit is contained in:
		@@ -69,7 +69,7 @@ dependencies {
 | 
				
			|||||||
	annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
 | 
						annotationProcessor 'jakarta.persistence:jakarta.persistence-api'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// p6spy
 | 
						// 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)
 | 
						// SpringDoc OpenAPI (Swagger)
 | 
				
			||||||
	implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9'
 | 
						implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -86,7 +86,6 @@ logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %m
 | 
				
			|||||||
# P6Spy 설정 (SQL 로깅)
 | 
					# P6Spy 설정 (SQL 로깅)
 | 
				
			||||||
# ========================================
 | 
					# ========================================
 | 
				
			||||||
decorator.datasource.p6spy.enable-logging=true
 | 
					decorator.datasource.p6spy.enable-logging=true
 | 
				
			||||||
decorator.datasource.p6spy.log-format=%(sqlSingleLine)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ========================================
 | 
					# ========================================
 | 
				
			||||||
# JWT 설정
 | 
					# JWT 설정
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								src/main/resources/spy.properties
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/main/resources/spy.properties
									
									
									
									
									
										Normal 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
 | 
				
			||||||
		Reference in New Issue
	
	Block a user