You require to permit logging for the following categories:
- org.hibernate.SQL - set to debug to log all SQL DML records as they are executed
- org.hibernate.typesetet to follow to log all JDBC parameters
So a log4j configuration could seem like:
# logs the SQL statements
# Logs the JDBC parameters passed to a query
The first is similar to hibernate.show_sql=true legacy property, the second prints the bound parameters between other things.
Another resolution (not hibernate based) would be to use a JDBC proxy operator like P6Spy.