-
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.
* chore: Loki 의존성 추가 (#133) * feat: Logback 설정 (#133) * test: Logback 모니터링 설정 (#133) * feat: loki url 변경 (#133) * feat: Logback 모니터링 설정 (#133)
- Loading branch information
1 parent
f9d9b95
commit 41ec2e5
Showing
2 changed files
with
44 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,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender"> | ||
<http> | ||
<url>http://3.37.189.47:3100/loki/api/v1/push</url> | ||
</http> | ||
<format> | ||
<label> | ||
<pattern>app=smunity,level=%level,host=${HOSTNAME}</pattern> | ||
</label> | ||
<message class="com.github.loki4j.logback.JsonLayout"/> | ||
</format> | ||
</appender> | ||
|
||
<springProfile name="local"> | ||
<root level="DEBUG"> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
</springProfile> | ||
|
||
<springProfile name="dev"> | ||
<root level="INFO"> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
</springProfile> | ||
|
||
<springProfile name="release"> | ||
<root level="WARN"> | ||
<appender-ref ref="CONSOLE"/> | ||
<appender-ref ref="LOKI"/> | ||
</root> | ||
</springProfile> | ||
</configuration> |