Skip to content

Commit

Permalink
🐛 [fix] logback.xml 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
choyeongju committed Jul 17, 2024
1 parent df44ae8 commit e48e065
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@
<!-- 파일 로그 설정 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>logs/my_app.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 매일 새로운 파일로 롤오버 -->
<fileNamePattern>logs/my_app.%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 최대 30개의 로그 파일을 보관 -->
<maxHistory>30</maxHistory>
<!-- 총 로그 파일 크기 제한 (옵션) -->
<totalSizeCap>3GB</totalSizeCap>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<!-- 롤오버되는 파일 이름 패턴 설정 -->
<fileNamePattern>logs/my_app.%i.log</fileNamePattern>
<!-- 최대 보관할 파일 수 설정 -->
<maxIndex>30</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<!-- 10MB를 초과하면 롤오버 -->
<maxFileSize>10MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
Expand Down

0 comments on commit e48e065

Please sign in to comment.