<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<appender name="FILE"
		class="ch.qos.logback.core.rolling.RollingFileAppender">
		<File>logs/log.log</File>
		<encoder>
			<pattern>
				%date{yyyy-MM-dd HH:mm:ss:SSS} [%relative ms] %-5level [%50.50(%logger{36}.%method:%line)] ---- %msg%n
			</pattern>
			<charset>UTF-8</charset> <!-- 此处设置字符集 -->
		</encoder>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- daily rollover -->
			<FileNamePattern>logs/log.%d{yyyy-MM-dd}.log</FileNamePattern>
			<!-- keep 10 days' worth of history -->
			<maxHistory>10</maxHistory>
		</rollingPolicy>
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>INFO</level>
		</filter>
	</appender>

	<!-- Console output -->
	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<!-- encoder defaults to ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
		<encoder>
			<pattern>
				%date{yyyy-MM-dd HH:mm:ss:SSS} [%relative ms] %-5level [%50.50(%logger{36}.%method:%line)] ---- %msg%n
			</pattern>
			<charset>UTF-8</charset> <!-- 此处设置字符集 -->
		</encoder>
		<!-- Only log level WARN and above -->
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>INFO</level>
		</filter>
	</appender>

	<!-- Enable FILE and STDOUT appenders for all log messages. By default, 
		only log at level INFO and above. -->
	<root level="INFO">
		<appender-ref ref="FILE" />
		<appender-ref ref="STDOUT" />
	</root>
</configuration>