0

I'm building a spring boot application. I'm trying to enable SQL logs in application.yml. How can I do it?

ddenis2307
  • 5
  • 1
  • 3
  • 2
    Does this answer your question? [How to log SQL statements in Spring Boot?](https://stackoverflow.com/questions/30118683/how-to-log-sql-statements-in-spring-boot) – Pirate Jun 18 '21 at 06:45

1 Answers1

1

We can use any one of these:

spring:
  jpa:
    show_sql: true

or

logging:
  level:
    org:
    hibernate:
        sql=debug
        type:
        descriptor:
            sql:trace
Drashti Dobariya
  • 2,455
  • 2
  • 10
  • 23