you may use several options, i believe the manual mentions them.
1. set up the hibernate.show_sql option to true, for exmaple in hibernate.cfg.xml
Code:
<property name="hibernate.show_sql">false</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.use_sql_comments">true</property>
<property name="hibernate.query.substitutions">true 1, false 0</property>
(There are som more properties you may find helpfull.)
2. Use the log level DEBUG for org.hibernate.SQL log4j logger, sample log4j.properties to print to console:
Code:
log4j.rootLogger = DEBUG, console
log4j.appender.console = org.apache.log4j.ConsoleAppender
log4j.appender.console.layout = org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern = %-4r [%t] %-5p (%c{1}) %l - %m%n
log4j.logger.org.hibernate.SQL = DEBUG, console
log4j.additivity.org.hibernate.SQL = false
regards, martin