Created
December 4, 2012 00:48
-
-
Save martinlau/4199473 to your computer and use it in GitHub Desktop.
portal-log4j-ext.xml configuration for logging hibernate statements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
<appender name="SQL_FILE" class="org.apache.log4j.rolling.RollingFileAppender"> | |
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> | |
<param name="FileNamePattern" value="@liferay.home@/logs/sql.%d{yyyy-MM-dd}.log" /> | |
</rollingPolicy> | |
<layout class="org.apache.log4j.PatternLayout"> | |
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}:%L] %m%n" /> | |
</layout> | |
</appender> | |
<logger name="org.hibernate.SQL"> | |
<level value="TRACE" /> | |
<appender-ref ref="SQL_FILE" /> | |
</logger> | |
<logger name="org.hibernate.type"> | |
<level value="TRACE" /> | |
<appender-ref ref="SQL_FILE" /> | |
</logger> | |
</log4j:configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment