2 Replies Latest reply on Jul 20, 2019 2:47 AM by negora negora

    Logging SQL statements from Hibernate when using a logging profile

    negora negora Newbie

      Hi:

       

      I'm trying to log the SQL statements generated by Hibernate to the file configured in a specific logging profile. I've created the logging profile and, then, I've added a logger for the category "org.hibernate.SQL" with the level "DEBUG". However, it hasn't taken any effect.

       

      I've tried to create the same logger out of the profile, and it has worked fine, as expected. But obviously, the SQL statements have been saved to the "server.log" file instead of the file that of the profile.

       

      So, Is it possible to log the SQL statements into a file of a logging profile?

       

      I've found this thread about a similar issue: "Wildfly : Logging SQL statements on application log file". But I'm not sure if it's exactly the same situation.

       

      Thank you.