Search code examples
javaeclipsehibernateloggingwildfly-11

Eclipse JPA Hibernate hibernate.show_sql


I am using wildfly server in Eclipse with JPA Api (hibernate) -> everything is fine (no errors), no problems when doing CRUD operations.

Now I want the queries to be displayed at console, so I added this property to persistence.xml:

hibernate.show_sql yes

enter image description here

But no sql query logging is present in console.

Any Suggestions ?


Solution

  • All your console output is showing INFO level logs. So apparently it's your log level that's preventing hibernate from printing SQLs. You probably have to set log level to DEBUG to see the SQLs.

    Please see below thread in this regard -

    Display Hibernate SQL To Console (Spring)