log4j.xml
720 Bytes
<?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">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%5p] [%d{yyyy-MM-dd HH:mm:ss SSS}] [%t] (%F:%L) %m%n"/>
</layout>
</appender>
<root>
<priority value="info"/> <!-- 根据实际情况修改日志级别,一般线上是INFO以上 -->
<appender-ref ref="CONSOLE"/> <!-- 该appender需要在上线时删除,以免输出重复的日志到catalina.out文件 -->
</root>
</log4j:configuration>