代码拉取完成,页面将自动刷新
<?xml version="1.0" encoding="UTF-8"?>
<!-- status="OFF",可以去掉,它的含义为是否记录log4j2本身的event信息,默认是OFF -->
<Configuration status="OFF">
<properties>
<property name="LOG_HOME">C:/logs</property>
</properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
<!--配置info日志级别-->
<RollingRandomAccessFile name="infoFile" fileName="${LOG_HOME}/info/info.log"
filePattern="${LOG_HOME}/$${date:yyyy-MM}/info-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Filters>
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="2 MB"/>
</Policies>
<!-- 最多备份20个 -->
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>
<!--配置error日志级别-->
<RollingRandomAccessFile name="errorFile" fileName="${LOG_HOME}/error/error.log"
filePattern="${LOG_HOME}/$${date:yyyy-MM}/error-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Filters>
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="2 MB"/>
</Policies>
<!-- 最多备份20个 -->
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>
<!--配置debug日志级别-->
<RollingRandomAccessFile name="debugFile" fileName="${LOG_HOME}/debug/debug.log"
filePattern="${LOG_HOME}/$${date:yyyy-MM}/debug/debug-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Filters>
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="2 MB"/>
</Policies>
<!-- 最多备份20个 -->
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>
<!--配置warn日志级别-->
<RollingRandomAccessFile name="warnFile" fileName="${LOG_HOME}/warn/warn.log"
filePattern="${LOG_HOME}/$${date:yyyy-MM}/warn/warn-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Filters>
<ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="2 MB"/>
</Policies>
<!-- 最多备份20个 -->
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>
<!--配置warn日志级别-->
<RollingRandomAccessFile name="fatalFile" fileName="${LOG_HOME}/fatal/fatal.log"
filePattern="${LOG_HOME}/$${date:yyyy-MM}/fatal/fatal-%d{yyyy-MM-dd}-%i.log">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
<Filters>
<ThresholdFilter level="fatal" onMatch="ACCEPT" onMismatch="DENY"/>
</Filters>
<Policies>
<TimeBasedTriggeringPolicy/>
<SizeBasedTriggeringPolicy size="2 MB"/>
</Policies>
<!-- 最多备份20个 -->
<DefaultRolloverStrategy max="20"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
<!-- 减少部分debug日志 -->
<logger name="druid.sql" level="INFO"/>
<logger name="org.apache.shiro" level="INFO"/>
<logger name="org.springframework" level="INFO"/>
<logger name="org.springframework.context" level="WARN"/>
<logger name="org.springframework.beans" level="WARN"/>
<logger name="org.apache.velocity" level="INFO"/>
<!-- cache INFO -->
<logger name="net.sf.ehcache" level="INFO"/>
<logger name="org.springframework.cache" level="INFO"/>
<logger name="oorg.apache.cxf.Logger" level="INFO"/>
<!-- 业务debug日志 -->
<logger name="com.hd" level="INFO"/>
<Root level="all">
<AppenderRef ref="Console"/>
<appender-ref ref="infoFile"/>
<appender-ref ref="warnFile"/>
<appender-ref ref="errorFile"/>
<appender-ref ref="debugFile"/>
<appender-ref ref="fatalFile"/>
</Root>
</Loggers>
</Configuration>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。