<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration>
<configuration scan="true" scanPeriod="30 seconds">
    
    <!-- 화면용 -->
	<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>@@ %date{MM-dd HH:mm:ss.SSS}|%-5level|%throwable{4}%logger{0}.%M\(%line\)::%msg |%thread %n</pattern>
		</encoder>
	</appender>
	
	<!-- 정상로그용 -->
	<appender name="fileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
	    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
	    	<fileNamePattern>../logs/mcare_plus_log_%d{yyyy-MM-dd}_%i.log</fileNamePattern>
	    	<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<!-- 100MB 마다 로그파일 새로 생성 -->
				<maxFileSize>100MB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
	    </rollingPolicy>
	    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>INFO</level>
		</filter>
		<encoder>
			<pattern>@@ %date{MM-dd HH:mm:ss.SSS}|%-5level|%throwable{4}%logger{0}.%M\(%line\)::%msg |%thread %n</pattern>
		</encoder>
	</appender>	
	
	<!-- 에러로그용 -->
	<appender name="errorFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
	    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
	    	<fileNamePattern>../logs/mcare_plus_error_%d{yyyy-MM-dd}_%i.log</fileNamePattern>
	    	<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<!-- 100MB 마다 로그파일 새로 생성 -->
				<maxFileSize>100MB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
	    </rollingPolicy>
		<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
			<level>WARN</level>
		</filter>	 
		<encoder>
			<pattern>@@ %date{MM-dd HH:mm:ss.SSS}|%-5level|%throwable{10}%logger{0}.%M\(%line\)::%msg |%thread %n</pattern>
		</encoder>
	</appender>	
	
	<logger name="com.dbs.mplus.service.mobile.payment.recovery" level="ERROR">
		<appender-ref ref="payErrorFileAppender" />
	</logger>
	
	<logger name="com.dbs.mplus">
	    <level value="debug"/> 
	</logger>
	<logger name="com.dbs.mplus.framework">
	    <level value="debug"/> 
	</logger>	
	<logger name="com.dbs.mplus.framework.listener">
	    <level value="debug"/> 
	</logger>
	<logger name="com.dbs.mplus.framework.template">
	    <level value="info"/> 
	</logger>
	<logger name="org.springframework">
	    <level value="warn"/> 
	</logger>
	<logger name="com.dbs.mplus.framework.service.admin.agreement.repository">
	    <level value="info"/> 
	</logger>
	<logger name="com.dbs.mplus.framework.service.admin.api.repository">
	    <level value="info"/> 
	</logger>	
	<logger name="com.dbs.mplus.framework.service.admin.history.repository">
	    <level value="info"/> 
	</logger>	
	<logger name="com.dbs.mplus.framework.service.admin.manager.repository">
	    <level value="info"/> 
	</logger>	
	<logger name="com.dbs.mplus.framework.service.admin.menu.repository">
	    <level value="info"/> 
	</logger>
	<logger name="com.dbs.mplus.framework.service.admin.push.repository">
	    <level value="info"/> 
	</logger>
	<logger name="com.dbs.mplus.framework.service.admin.telno.repository">
	    <level value="info"/> 
	</logger>	
	<logger name="com.dbs.mplus.framework.service.admin.version.repository">
	    <level value="info"/> 
	</logger>	
	<!-- 디버깅용 
	<logger name="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping">
	    <level value="debug"/> 
	</logger>	-->
	<logger name="org.apache.tiles">
	    <level value="info"/> 
	</logger>
	<logger name="org.springframework.transaction">
	    <level value="info"/> 
	</logger>		
	<logger name="org.springframework.jdbc">
	    <level value="info"/> 
	</logger>	
	<logger name="org.apache.commons">
	    <level value="info"/> 
	</logger>
	<logger name="org.apache.http">
	    <level value="warn"/> 
	</logger>
	<root level="DEBUG">
		<appender-ref ref="consoleAppender" />
		<appender-ref ref="fileAppender" />
		<appender-ref ref="errorFileAppender" />
	</root>
	
</configuration>
