i'm newbie in spring-boot.
i want log sql statements in file. have following properties in application.properties
spring.datasource.url=... spring.datasource.username=user spring.datasource.password=1234 spring.datasource.driver-class-name=net.sourceforge.jtds.jdbc.driver spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true security.ignored=true security.basic.enabled=false logging.level.org.springframework.web=info logging.level.org.hibernate=info logging.file=c:/temp/my-log/app.log
when run application
cmd>mvn spring-boot:run
i can see sql statements in console don't appear in file app.log. file contains basic logs spring.
what should see sql statements in log file?
try using in properties file:
logging.level.org.hibernate.sql=debug logging.level.org.hibernate.type.descriptor.sql.basicbinder=trace
Comments
Post a Comment