I am developing a web application using the Play platform with JPA / Hibernate. For debugging purposes, it would be great to see the SQL statements used by JPA. There is already another thread there with the same question, but it is about Play 1, and this solution does not work for me - it seems that jpa.debugSQL=true cannot be used in Play 2 (a persistence provider for EntityManager named true) .
Instead, I added the following to play application.conf:
db.default.logStatements=true logger.org.hibernate=DEBUG
I'm not sure I need both rows, but at least SQL queries are being logged now. But for large queries, Hibernate prints a ton of debugging messages that cause already printed SQL statements to disappear in my console window. I already tried to increase the buffer of the console window, but this has not changed much.
What do I need to do to conveniently study applications?
edit:
When setting logger.org.hibernate to INFO I don't get any statements at all (even with db.default.logStatements=true ).
source share