I'm using Hibernate's EntityManager as a JPA implementation. What I want is logging of the query (HQL or JPA Query Language) made to EntityManager. This is different than SQL logging (which is enabled with the hibernate.show_sql
property).
My application issues several queries to Hibernate. I want logging of both the queries issued to Hibernate and the corresponding generated SQL queries. I'd like to achieve this without having to add my own logging just before querying Hibernate.
Does Hibernate support this?