hibernate.show_sql=true
2. add following to loj4j.xml
<appender name="trace" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="/export/home/log_path/trace.log"/>
<param name="Threshold" value="trace"/>
<param name="DatePattern" value="'.'yyyy-MM-dd-HH'.log'"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{DATE} %-5p [%t] %c{1} - %m%n"/>
</layout>
</appender>
<category name="org.hibernate.type">
<priority value="trace"/>
</category>
<category name="org.hibernate.SQL">
<priority value="trace"/>
</category>
1 comment:
If you want to avoid printing any logs in the logs files, add folowing to the log4j.xml
<category name="org.hibernate">
<priority value="error"/>
</category>
Post a Comment