Monday, January 14, 2008

spring log4j xml configuration template


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p: %c - %m%n" />
</layout>
</appender>

<!-- Application logger -->
<logger name="yourapp">
<level value="info" />
</logger>

<!-- 3rdparty Loggers -->
<logger name="org.springframework.beans">
<level value="warn" />
</logger>

<logger name="org.springframework.jdbc">
<level value="warn" />
</logger>

<logger name="org.springframework.transaction">
<level value="warn" />
</logger>

<logger name="org.springframework.orm">
<level value="warn" />
</logger>

<logger name="org.springframework.web">
<level value="warn" />
</logger>

<logger name="org.springframework.webflow">
<level value="warn" />
</logger>

<!-- Root Logger -->
<root>
<priority value="warn" />
<appender-ref ref="console" />
</root>

</log4j:configuration>

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home