<?xml version="1.0" encoding="UTF-8"?>
<configuration>

	<!-- 로그파일 저장 경로 -->
	<property name="LOG_DIR" value="/logfs/I4WAY_Genesys_Service/log" />

	<!-- CONSOLE -->
	<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
		<layout class="ch.qos.logback.classic.PatternLayout">
			<Pattern>
				[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} : %30logger{5} - %msg%n
			</Pattern>
		</layout> 
	</appender>
	<!-- // CONSOLE --> 
	<!-- SYSLOG -->
	<appender name="SYSLOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${LOG_DIR}/I4WAY_Genesys_Service_log.log</file>
		<layout class="ch.qos.logback.classic.PatternLayout">
			<Pattern>
				[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} : %30logger{5} - %msg%n
			</Pattern>
		</layout>
		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
			<fileNamePattern>${LOG_DIR}/I4WAY_Genesys_Service_log.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
			<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
				<maxFileSize>30MB</maxFileSize>
			</timeBasedFileNamingAndTriggeringPolicy>
			<maxHistory>30</maxHistory>
		</rollingPolicy>
	</appender>
	<!-- // SYSLOG -->
	
	<root level="info">
		<appender-ref ref="CONSOLE" />
		<appender-ref ref="SYSLOG" />
	</root>
	<logger name="com.example.logbackStudy" level="debug" additivity="false">
		<appender-ref ref="CONSOLE" />
	</logger>
	
</configuration>