<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
			<charset class="java.nio.charset.Charset">UTF-8</charset>
		</encoder>
	</appender>

	<appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>/tmp/logs/wlyy.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>/tmp/logs/wlyy.%d{yyyy-MM-dd}.log</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
			<charset class="java.nio.charset.Charset">UTF-8</charset>
		</encoder>
	</appender>

	<appender name="business_m" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>/usr/local/wlyy_logs/business_m.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>/usr/local/wlyy_logs/rolling/business_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%msg%n</pattern>
			<charset class="java.nio.charset.Charset">UTF-8</charset>
		</encoder>
	</appender>
	<appender name="business_d" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>/usr/local/wlyy_logs/business.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>/usr/local/wlyy_logs/dayLogs/business.%d{yyyy-MM-dd}.log</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%msg%n</pattern>
			<charset class="java.nio.charset.Charset">UTF-8</charset>
		</encoder>
	</appender>
	<appender name="interface_call_m" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>/usr/local/wlyy_logs/interface_call_m.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>/usr/local/wlyy_logs/rolling/interface_call_m.%d{yyyy-MM-dd_HH-mm}.log</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%msg%n</pattern>
			<charset class="java.nio.charset.Charset">UTF-8</charset>
		</encoder>
	</appender>
	<appender name="interface_call_d" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>/usr/local/wlyy_logs/interface_call.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>/usr/local/wlyy_logs/dayLogs/interface_call.%d{yyyy-MM-dd}.log</fileNamePattern>
		</rollingPolicy>
		<encoder>
			<pattern>%msg%n</pattern>
			<charset class="java.nio.charset.Charset">UTF-8</charset>
		</encoder>
	</appender>

	<!-- project default level -->
	<logger name="com.yihu.wlyy" level="INFO" />

	<!--log4jdbc -->
	<logger name="jdbc.sqltiming" level="INFO"/>

	<logger name="com.yihu.wlyy.logs.BusinessLogs" level="INFO" additivity="false">
		<appender-ref ref="business_m" />
		<appender-ref ref="business_d" />
	</logger>
	<logger name="com.yihu.wlyy.logs.InterfaceCallLogs" level="INFO" additivity="false">
		<appender-ref ref="interface_call_m" />
		<appender-ref ref="interface_call_d" />
	</logger>

	<root level="WARN">
		<appender-ref ref="console" />
		<appender-ref ref="rollingFile" />
	</root>
</configuration>