build: log 및 data 파일 위치 조정

local - user.home/data/adds/logs
               user.home/data/adds/files
       prod - /data/adds/logs
              /data/adds/files
dev
Jonguk. Lim 5 months ago
parent f503531e00
commit fa59b11089

@ -58,9 +58,17 @@ propertyService:
# filename: classpath*:properties/your-file-02.properties
app:
data:
root:
path: ${user.home}/data/adds
file:
root:
path: ${user.home}/data/adds/files/
path: ${app.data.root.path}/files/
logging:
file:
path: ${app.data.root.path}/logs
name: ${spring.application.name}
---
spring:
config:
@ -109,6 +117,6 @@ propertyService:
app:
api:
host: http://211.119.124.9:9076
file:
data:
root:
path: /data/adds/files/
path: /data/adds

@ -2,8 +2,8 @@
<!-- 60초마다 설정 파일의 변경을 확인 하여 변경시 갱신 -->
<configuration scan="true" scanPeriod="60 seconds">
<springProperty scope="context" name="applicationName" source="spring.application.name"/>
<property name="LOG_PATH" value="logs"/>
<property name="LOG_FILE_NAME" value="${applicationName}"/>
<!-- <property name="LOG_PATH" value="logs"/>-->
<!-- <property name="LOG_FILE_NAME" value="${applicationName}"/>-->
<property name="ERR_LOG_FILE_NAME" value="${LOG_FILE_NAME}-error"/>
<property name="LOG_PATTERN" value="%d{HH:mm:ss.SSS} %-5level [%logger{0}:%line] - %msg%n"/>
@ -14,14 +14,14 @@
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${LOG_FILE_NAME}.log</file>
<file>${LOG_PATH}/${LOG_FILE}.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- .gz,.zip 등을 넣으면 자동 일자별 로그파일 압축 -->
<fileNamePattern>${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log</fileNamePattern>
<fileNamePattern>${LOG_PATH}/${LOG_FILE}.%d{yyyy-MM-dd}_%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
@ -39,14 +39,14 @@
<onMismatch>DENY</onMismatch>
</filter>
<file>${LOG_PATH}/${ERR_LOG_FILE_NAME}.log</file>
<file>${LOG_PATH}/${LOG_FILE}-error.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- .gz,.zip 등을 넣으면 자동 일자별 로그파일 압축 -->
<fileNamePattern>${LOG_PATH}/${ERR_LOG_FILE_NAME}.%d{yyyy-MM-dd}_%i.log</fileNamePattern>
<fileNamePattern>${LOG_PATH}/${LOG_FILE}-error.%d{yyyy-MM-dd}_%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- 파일당 최고 용량 kb, mb, gb -->
<maxFileSize>10MB</maxFileSize>

Loading…
Cancel
Save