-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<included> | ||
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<file>./logs/error.log</file> | ||
|
||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> | ||
<level>ERROR</level> | ||
<onMatch>ACCEPT</onMatch> | ||
<onMismatch>DENY</onMismatch> | ||
</filter> | ||
|
||
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"> | ||
<providers> | ||
<mdc/> | ||
<pattern> | ||
<pattern> | ||
{ | ||
"timestamp": "%date{yyyyMMdd HHmmss.SSSSSS}", | ||
"message": "%message", | ||
"stacktrace": "%rEx" | ||
} | ||
</pattern> | ||
</pattern> | ||
</providers> | ||
<timestampPattern>yyyyMMddHHmmss.SSSSSS</timestampPattern> | ||
</encoder> | ||
|
||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<fileNamePattern>./logs/history/error-history.log.%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | ||
<maxFileSize>50MB</maxFileSize> | ||
<!-- 한 로그 파일이 50MB 차면 위 fileNamePattern으로 분리해 저장한다 --> | ||
</timeBasedFileNamingAndTriggeringPolicy> | ||
<maxHistory>30</maxHistory> | ||
<totalSizeCap>2GB</totalSizeCap> | ||
<!-- 30일이 경과하거나, 전체 로그파일 용향이 2GB를 초과하면 오래된 파일 순으로 삭제한다. --> | ||
</rollingPolicy> | ||
</appender> | ||
</included> |