<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<property resource="application.properties" />
	
	<logger name="com.roncoo" level="debug" />

	<!-- 控制台设置 -->
	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>${log.pattern}</pattern>
		</encoder>
	</appender>

	<!-- 文件设置 -->
	<appender name="LOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<!-- 文件路径 -->
		<file>${log.path}${log.file}.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<!-- 文件名称 -->
			<fileNamePattern>${log.path}${log.file}.%d{yyyy-MM-dd}.log</fileNamePattern>
			<!-- 文件最大保存历史数量 -->
			<MaxHistory>${log.maxHistory}</MaxHistory>
		</rollingPolicy>

		<layout class="ch.qos.logback.classic.PatternLayout">
			<pattern>${log.pattern}</pattern>
		</layout>
	</appender>

	<root level="${log.lever}">
		<appender-ref ref="CONSOLE" />
		<appender-ref ref="LOGFILE" />
	</root>
	<!-- 打印sql语句 -->
	<logger name="com.xintong.visualinspection.visuallnspection_qzd.dao" level="DEBUG"></logger>
</configuration>
