log temple xml

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

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

    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <param name="Target" value="System.out" />
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %p %C{1}\t%m%n" />
        </layout>
    </appender>
	<appender name="FILE" class="org.apache.log4j.FileAppender">
		<param name="File" value="D:\\tmp\\api-crm-log.log" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d - %c -%-4r [%t] %-5p %x - %m%n" />
		</layout>
	</appender> 
<!-- 
    <appender name="flume" class="org.apache.flume.clients.log4jappender.Log4jAppender">
        <param name="Hostname" value="t4.hadoop.lashou.web" />
        <param name="Port" value="44444" />
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS}\t%m%n" />
        </layout>
    </appender>
     -->
<!-- 
    <logger name="com.lashou" additivity="false">
        <level value="info" />
        <appender-ref ref="console" />
    </logger>
    <logger name="crmlog">
        <level value="info"/>
        <appender-ref ref="flume"/>
    </logger>
 -->
    <logger name="org.springframework">
        <level value="ALL" />
        <appender-ref ref="FILE" />
    </logger>

    <root>
        <priority value="info" />
        <appender-ref ref="console" />
        <appender-ref ref="FILE" />
    </root>

</log4j:configuration>

你可能感兴趣的:(log4j,xml)