log4j.xml 1.23 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration PUBLIC
		"-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
<log4j:configuration>
	<appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}:%p %c{1} - %m%n" />
		</layout>
	</appender>


	<appender name="LOG_SYSTEM" class="org.apache.log4j.DailyRollingFileAppender">
		<param name="Encoding" value="UTF-8"/>
		<param name="Append" value="true" />
		<!--<param name="BufferedIO" value="true" />-->
		<!--<param name="BufferSize" value="8192" />-->
		<param name="File" value="/diliapp/logs/log_system.log"/>
		<param name="DatePattern" value="'.'yyyy-MM-dd" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="[%p] [%d] [%r] [%c] - %m %n"/>
		</layout>
	</appender>

	<category name="LOG_SYSTEM" additivity="false">
		<priority value="INFO"/>
		<appender-ref ref="LOG_SYSTEM"/>
	</category>


	<root>
		<priority value="info" />
		<appender-ref ref="ConsoleAppender" />
		<!--<appender-ref ref="LOG_SYSTEM" />-->
	</root>
</log4j:configuration>