You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
948 B

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn">
<Appenders>
<Console name="Console" target="SYSTEM_OUT" ignoreExceptions="false">
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%t] (%F:%L) - %m%n" />
</Console>
<RollingFile name="RollingFileInfo" fileName="/data/logs/tomcat8/tomcat.log"
filePattern="/data/logs/tomcat8/$${date:yyyy-MM}/info-%d{yyyy-MM-dd}-%i.log"> <!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch) -->
<ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY" />
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%t] (%F:%L) - %m%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<SizeBasedTriggeringPolicy size="100 MB" />
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console" />
<AppenderRef ref="RollingFileInfo" />
</Root>
</Loggers>
</Configuration>