Output SQL queries
The simplest way to output SQL queries, but it is not recommended. it directly uploads to standard output without any optimizations of a logging framework. Moreover, it doesn't log the parameters of prepared statements.
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
Output SQL queries via loggers
The hibernate logs will be sent to the configured appender. By default, Spring Boot uses Logback with a standard out appender.
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
No comments:
Post a Comment