<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<!-- always a good activate OnConsoleStatusListener -->
	<statusListener
		class="ch.qos.logback.core.status.OnConsoleStatusListener" />

	<springProperty name="LOGPATH" source="logging.path" />
	<springProperty name="APPNAME" source="spring.application.name" />

	<property name="log.path" value="F:/Eclipse/work/log/${APPNAME:-.}/${HOSTNAME:-.}" />

	<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<file>${log.path}/access/access.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
			<fileNamePattern>${log.path}/access/access-%i.log</fileNamePattern>
			<minIndex>1</minIndex>
			<maxIndex>1</maxIndex>
		</rollingPolicy>
		<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
			<maxFileSize>10MB</maxFileSize>
		</triggeringPolicy>
		<encoder>
			<pattern>%t{yyyy-MM-dd HH:mm:ss.SS} "%r" %s %b %D %h "%i{Referer}" "%i{User-Agent}" "%i{X-Request-ID}" "%i{X-Forwarded-For}"</pattern>
			<charset>UTF-8</charset>
		</encoder>
	</appender>
	<appender-ref ref="FILE" />
</configuration>
