<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
<log4j:configuration debug="true">


	<!-- 在控制台输出的日志文件，info级别以上 -->
	<appender name="Console" class="org.apache.log4j.ConsoleAppender">
		<param name="Encoding" value="UTF-8" />
		<param name="Threshold" value="ERROR" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d %p %c %t %m%n" />
		</layout>
	</appender>
	<!--输出文件中，该文件中只能输出info级别的日志 -->
	<appender name="INFO" class="org.apache.log4j.DailyRollingFileAppender">
		<param name="Encoding" value="UTF-8" />
		<param name="File" value="c:/logs/sso/info/info.log" />
		<!--<param name="File" value="/usr/local/logs/sso/info/info.log" />-->
		<param name="DatePattern" value=".yyyy-MM-dd" />
		<param name="Append" value="true" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d %p %c %t %m%n" />
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMin" value="INFO" />
			<param name="LevelMax" value="INFO" />
		</filter>
	</appender>
	<!--输出文件中，该文件中只能输出erro级别的日志 -->
	<appender name="ERROR" class="org.apache.log4j.DailyRollingFileAppender">
		<param name="Encoding" value="UTF-8" />
		<param name="File" value="c:/logs/sso/error/error.log" />
		<!--<param name="File" value="/usr/local/logs/sso/error/error.log" />-->
		<param name="DatePattern" value=".yyyy-MM-dd" />
		<param name="Append" value="true" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d %p %c %t %m%n" />
		</layout>
		<filter class="org.apache.log4j.varia.LevelRangeFilter">
			<param name="LevelMin" value="ERROR" />
			<param name="LevelMax" value="ERROR" />
		</filter>
	</appender>
	<root>
		<priority value="INFO" />
		<appender-ref ref="INFO" />
		<appender-ref ref="ERROR" />
		<appender-ref ref="Console" />
	</root>

</log4j:configuration>