사용자 도구

사이트 도구


java:hibernate:log

차이

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

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:hibernate:log [2022/05/02 22:36]
kwon37xi [logback]
java:hibernate:log [2023/12/24 11:38] (현재)
kwon37xi
줄 15: 줄 15:
   * [[java:jdbc:datasource_proxy|DataSource Proxy]]   * [[java:jdbc:datasource_proxy|DataSource Proxy]]
  
 +JDBC 드라이버 자체 로깅을 사용하면 프레임워크등에 의해 실행되는 너무 세세한 로그가 남는 반면, 파라미터까지 정확하게 정확한 호출 순서에 따라 로그를 볼 수 이는 장점이 있다.
 ===== Log Categories ===== ===== Log Categories =====
   * ''org.hibernate'' : 모든 메시지   * ''org.hibernate'' : 모든 메시지
줄 23: 줄 24:
   * ''org.hibernate.orm.jdbc.bind = TRACE'' : 바인딩된 파라미터 값(Hibernate 6)   * ''org.hibernate.orm.jdbc.bind = TRACE'' : 바인딩된 파라미터 값(Hibernate 6)
   * ''org.hibernate.SQL_SLOW = INFO'' : Hibernate 5.4.5 이상 버전에서 Slow Query   * ''org.hibernate.SQL_SLOW = INFO'' : Hibernate 5.4.5 이상 버전에서 Slow Query
 +    * ''hibernate.session.events.log.LOG_QUERIES_SLOWER_THAN_MS=밀리초'' property 를 지정해주면 이 값을 따름.
   * ''org.hibernate.pretty'' : flush 시점의 세션이 있는 Entity 들의 상태(최대 20 개만)   * ''org.hibernate.pretty'' : flush 시점의 세션이 있는 Entity 들의 상태(최대 20 개만)
   * ''org.hibernate.cache'' : 2차 캐시 상태   * ''org.hibernate.cache'' : 2차 캐시 상태
   * ''org.hibernate.stat = DEBUG'' : 모든 쿼리의 분석 통계   * ''org.hibernate.stat = DEBUG'' : 모든 쿼리의 분석 통계
   * ''org.hibernate.tool.hbm2ddl = DEBUG'' : DDL 로그   * ''org.hibernate.tool.hbm2ddl = DEBUG'' : DDL 로그
- 
   * ''org.hibernate.transaction'' : 트랜잭션 정보   * ''org.hibernate.transaction'' : 트랜잭션 정보
   * ''org.hibernate.jdbc'' : JDBC 리소스 처리 상태 로깅   * ''org.hibernate.jdbc'' : JDBC 리소스 처리 상태 로깅
줄 91: 줄 92:
   * [[https://stackoverflow.com/questions/1710476/how-to-print-a-query-string-with-parameter-values-when-using-hibernate|java - How to print a query string with parameter values when using Hibernate - Stack Overflow]]   * [[https://stackoverflow.com/questions/1710476/how-to-print-a-query-string-with-parameter-values-when-using-hibernate|java - How to print a query string with parameter values when using Hibernate - Stack Overflow]]
   * [[https://thorben-janssen.com/hibernate-tips-how-to-log-sql-statements-and-their-parameters/|Hibernate Tips: How to log SQL statements and their param]]   * [[https://thorben-janssen.com/hibernate-tips-how-to-log-sql-statements-and-their-parameters/|Hibernate Tips: How to log SQL statements and their param]]
 +  * [[https://thorben-janssen.com/hibernate-slow-query-log/|Hibernate Slow Query Log - The easiest way to find slow queries]] 
 +  * [[https://thorben-janssen.com/hibernate-logging-guide/|Logging Guide for Hibernate 4, 5 & 6 - Use the right config for dev and prod]] 
 +  * [[https://vladmihalcea.com/log-sql-spring-boot/|The best way to log SQL statements with Spring Boot - Vlad Mihalcea]]
java/hibernate/log.1651498611.txt.gz · 마지막으로 수정됨: 2022/05/02 22:36 저자 kwon37xi