Skip to content

Commit

Permalink
feat: logback config file
Browse files Browse the repository at this point in the history
  • Loading branch information
redcarrot1 committed May 30, 2024
1 parent ea09889 commit f9e0535
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,12 @@

<!-- 파일(FILE) -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- log 기록할 파일 위치 설정 -->
<file>${LOG_PATH}/${LOG_FILE_NAME}_${BY_DATE}.log</file>
<!-- log 기록 타입 인코딩 -->
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_PATH}/archive/${LOG_FILE_NAME}.%d{yyyy-MM-dd}.log</fileNamePattern>
<fileNamePattern>${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}.log</fileNamePattern>
<maxHistory>${LOG_MAX_HISTORY}</maxHistory>
<totalSizeCap>${LOG_TOTAL_SIZE_CAP}</totalSizeCap>
</rollingPolicy>
Expand Down Expand Up @@ -89,6 +86,10 @@
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
<logger name="com.playkuround.playkuroundserver.global.error.GlobalExceptionHandler"
level="ERROR" additive="false">
<appender-ref ref="FILE"/>
</logger>
</springProfile>

</configuration>

0 comments on commit f9e0535

Please sign in to comment.