-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from MYONGSIK/infra/monitoring
#122 ๋ก๊ทธ ๋ชจ๋ํฐ๋ง ๊ตฌ์ถ ์๋ฃ
- Loading branch information
Showing
5 changed files
with
75 additions
and
3 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
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 |
---|---|---|
|
@@ -55,4 +55,4 @@ spring: | |
--- | ||
spring: | ||
profiles: | ||
active: local | ||
active: local |
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,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<!-- ๋ก๊ทธ ํจํด์ ์์ ์ ์ฉ %clr(pattern){color} | ||
https://logback.qos.ch/manual/layouts.html#coloring | ||
--> | ||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> | ||
|
||
<springProfile name="dev"> | ||
<property resource="application-dev.yml" /> | ||
</springProfile> | ||
|
||
<!-- log ๋ณ์ ๊ฐ ์ค์ --> | ||
<springProperty name="LOG_PATH" source= "log.config.path" /> | ||
<springProperty name="LOG_FILE_NAME" source= "log.config.filename" /> | ||
<springProperty name="LOG_MAX_HISTORY" source= "log.config.maxHistory" /> | ||
<springProperty name="LOG_TOTAL_SIZE_CAP" source= "log.config.totalSizeCap" /> | ||
|
||
<property name="CONSOLE_LOG_PATTERN" | ||
value="[%d{yyyy-MM-dd HH:mm:ss}:%-3relative] %clr(%-5level) %clr(${PID:-}){magenta} %clr(---){faint} %clr([%15.15thread]){faint} %clr(%-40.40logger{36}){cyan} %clr(:){faint} %msg%n"/> | ||
<property name="FILE_LOG_PATTERN" | ||
value="[%d{yyyy-MM-dd HH:mm:ss}:%-3relative] %-5level ${PID:-} --- [%15.15thread] %-40.40logger{36} : %msg%n"/> | ||
|
||
<!-- ์ฝ์(STDOUT) --> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> | ||
</layout> | ||
</appender> | ||
|
||
<!-- ํ์ผ(FILE) --> | ||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
<!-- log ๊ธฐ๋กํ ํ์ผ ์์น ์ค์ --> | ||
<file>${LOG_PATH}/${LOG_FILE_NAME}.log</file> | ||
<!-- log ๊ธฐ๋ก ํ์ ์ธ์ฝ๋ฉ --> | ||
<encoder> | ||
<pattern>${FILE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | ||
<!-- daily rollover --> | ||
<fileNamePattern>${LOG_PATH}/${LOG_FILE_NAME}.%d{yyyy-MM-dd}.log</fileNamePattern> | ||
<maxHistory>${LOG_MAX_HISTORY}</maxHistory> | ||
<totalSizeCap>${LOG_TOTAL_SIZE_CAP}</totalSizeCap> | ||
</rollingPolicy> | ||
</appender> | ||
|
||
<!-- spring profile๋ณ ๋ก๊ทธ ์ค์ --> | ||
<!-- dev ํ๊ฒฝ --> | ||
<springProfile name="dev"> | ||
<root level="info"> | ||
<!-- ์ฐธ์กฐํ appender - STDOUT --> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
<logger name="org.springframework.web" level="debug"> | ||
<!-- ์ฐธ์กฐํ appender - FILE --> | ||
<appender-ref ref="FILE" /> | ||
</logger> | ||
</springProfile> | ||
|
||
</configuration> |