Skip to content

Commit

Permalink
Merge pull request #115 from depromeet/feature/#9
Browse files Browse the repository at this point in the history
[feat][#9] logback 추가
  • Loading branch information
sejoon00 authored Aug 30, 2024
2 parents c94ecb9 + f9941a9 commit 4006904
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ dependencies {
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"

implementation 'net.logstash.logback:logstash-logback-encoder:7.4'

//s3
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'

Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<configuration>
<appender class="net.logstash.logback.appender.LogstashTcpSocketAppender" name="LOGSTASH">
<!-- Logstash가 수신할 호스트와 포트 -->
<destination>dev.bbogak.com:5000</destination>

<encoder class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender>

<!-- 로그 레벨 설정 (INFO_LOG) -->
<logger level="DEBUG" name="INFO_LOG">
<appender-ref ref="LOGSTASH"/>
</logger>

<!-- ROOT 로거에 대한 설정 -->
<root level="INFO">
<appender-ref ref="LOGSTASH"/>
</root>
</configuration>

0 comments on commit 4006904

Please sign in to comment.