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
log4j.logger.org.hibernate.SQL=debug
# Logs the JDBC parameters passed to a query
log4j.logger.org.hibernate.type=trace
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.