사용자 도구

사이트 도구


java:hibernate:log

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
java:hibernate:log [2021/02/16 18:24]
kwon37xi [Hibernate Log 남기기]
java:hibernate:log [2022/05/02 22:34]
kwon37xi [Log Categories]
줄 14: 줄 14:
   * [[https://log4jdbc.brunorozendo.com|log4jdbc]]   * [[https://log4jdbc.brunorozendo.com|log4jdbc]]
   * [[java:jdbc:datasource_proxy|DataSource Proxy]]   * [[java:jdbc:datasource_proxy|DataSource Proxy]]
 +
 +===== Log Categories =====
 +  * ''org.hibernate'' : 모든 메시지
 +  * ''org.hibernate.SQL = DEBUG'' : SQL 구문
 +  * ''org.hibernate.type.descriptor.sql = TRACE'' : 바인딩된 파라미터 값(Hibernate 4,5)
 +    * ''org.hibernate.type = TRACE'' 은 모든 JDBC 파라미터를 찍으며, 이 경우 로그가 과도하게 찍히기 때문에
 +    * ''org.hibernate.type.BasicTypeRegistry = WARN'' 으로 로그 출력을 줄여줄수도 있다.
 +  * ''org.hibernate.orm.jdbc.bind = TRACE'' : 바인딩된 파라미터 값(Hibernate 6)
 +  * ''org.hibernate.SQL_SLOW = INFO'' : Hibernate 5.4.5 이상 버전에서 Slow Query
 +  * ''org.hibernate.pretty'' : flush 시점의 세션이 있는 Entity 들의 상태(최대 20 개만)
 +  * ''org.hibernate.cache'' : 2차 캐시 상태
 +  * ''org.hibernate.stat = DEBUG'' : 모든 쿼리의 분석 통계
 +  * ''org.hibernate.tool.hbm2ddl = DEBUG'' : DDL 로그
 +
 +  * ''org.hibernate.transaction'' : 트랜잭션 정보
 +  * ''org.hibernate.jdbc'' : JDBC 리소스 처리 상태 로깅
 +  * ''org.hibernate.hql.ast.AST'' : Log HQL and SQL ASTs during query parsing
 +  * ''org.hibernate.secure'' : Log all JAAS authorization requests
 +
 ===== logback ===== ===== logback =====
   * ''logback.groovy''<code groovy>   * ''logback.groovy''<code groovy>
줄 71: 줄 90:
 디버깅시 가장 중요한 SQL로그와 파라미터/결과 로그는 **log4j.logger.org.hibernate.SQL=debug**와 **log4j.logger.org.hibernate.type=TRACE** 이다. 디버깅시 가장 중요한 SQL로그와 파라미터/결과 로그는 **log4j.logger.org.hibernate.SQL=debug**와 **log4j.logger.org.hibernate.type=TRACE** 이다.
  
-===== Hibernate Log Categories ===== 
-  * ''org.hibernate.SQL'' Log all SQL DML statements as they are executed 
-  * ''org.hibernate.type'' Log all JDBC parameters 
-  * ''org.hibernate.type.BasicTypeRegistry''는 너무 많은 로그를 찍으므로 WARN 정도로 레벨을 올릴 것. 
-  * ''org.hibernate.tool.hbm2ddl'' Log all SQL DDL statements as they are executed 
-  * ''org.hibernate.pretty'' Log the state of all entities (max 20 entities) associated with the session at flush time 
-  * ''org.hibernate.cache'' Log all second-level cache activity 
-  * ''org.hibernate.transaction'' Log transaction related activity 
-  * ''org.hibernate.jdbc'' Log all JDBC resource acquisition 
-  * ''org.hibernate.hql.ast.AST'' Log HQL and SQL ASTs during query parsing 
-  * ''org.hibernate.secure'' Log all JAAS authorization requests 
-  * ''org.hibernate'' Log everything. This is a lot of information but it is useful for troubleshooting  
  
 ===== SQL Formatter ===== ===== SQL Formatter =====
java/hibernate/log.txt · 마지막으로 수정됨: 2023/12/24 11:38 저자 kwon37xi