-
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.
* feat: logback 설정 추가 * feat: docker-compose에 log volume 설정
- Loading branch information
1 parent
30af305
commit 6a73076
Showing
2 changed files
with
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<configuration debug="true"> | ||
<property resource="application.yml"/> | ||
|
||
<springProperty name="LOGS_ABSOLUTE_PATH" source="log.file.path"/> | ||
|
||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> | ||
|
||
<appender name="API_ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!-- rollover daily --> | ||
<fileNamePattern>${LOGS_ABSOLUTE_PATH}/%d/%d{yyyy-MM-dd}.%i.log</fileNamePattern> | ||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> | ||
<maxFileSize>100MB</maxFileSize> | ||
</timeBasedFileNamingAndTriggeringPolicy> | ||
</rollingPolicy> | ||
<encoder> | ||
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<springProfile name="prd"> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
<logger name="com.few" level="DEBUG"> | ||
<appender-ref ref="API_ROLLING"/> | ||
</logger> | ||
<logger name="org.jooq" level="DEBUG"> | ||
<appender-ref ref="API_ROLLING"/> | ||
</logger> | ||
<logger name="org.springframework" level="INFO"> | ||
<appender-ref ref="API_ROLLING"/> | ||
</logger> | ||
</springProfile> | ||
|
||
<springProfile name="local"> | ||
<root level="DEBUG"> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
</springProfile> | ||
|
||
</configuration> |
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