Skip to content

Commit

Permalink
chore: 프로파일별 로그 레벨 설정 (#775)
Browse files Browse the repository at this point in the history
* chore: 로그 레벨 설정 변경

* chore: OpenFeign Sentry 연동 추가
  • Loading branch information
uwoobeat authored Sep 16, 2024
1 parent a1549ca commit e60e0d9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ dependencies {

// Sentry
implementation 'io.sentry:sentry-logback:7.14.0'
implementation 'io.sentry:sentry-openfeign:7.14.0'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import feign.Capability;
import feign.Logger;
import feign.codec.Decoder;
import feign.jackson.JacksonDecoder;
import io.sentry.openfeign.SentryCapability;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignFormatterRegistrar;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -41,4 +43,9 @@ public FeignFormatterRegistrar dateTimeFormatterRegistrar() {
registrar.registerFormatters(registry);
};
}

@Bean
public Capability sentryCapability() {
return new SentryCapability();
}
}
4 changes: 2 additions & 2 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ spring:

logging:
level:
org.springframework.orm.jpa: DEBUG
org.springframework.transaction: DEBUG
com.gdschongik.gdsc.domain.*.api.*: info
com.gdschongik.gdsc.infra.feign: debug
7 changes: 5 additions & 2 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ spring:
properties:
hibernate:
format_sql: ${FORMAT_SQL:true}
highlight_sql: ${HIGHLIGHT_SQL:true}
defer-datasource-initialization: true
open-in-view: false

logging:
level:
org.springframework.orm.jpa: DEBUG
org.springframework.transaction: DEBUG
com.gdschongik.gdsc.domain.*.api.*: debug
com.gdschongik.gdsc.infra.feign: debug
org.hibernate.orm.jdbc.bind: trace
org.hibernate.SQL: debug
org.kohsuke.github: debug
3 changes: 1 addition & 2 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ spring:

logging:
level:
org.springframework.orm.jpa: DEBUG
org.springframework.transaction: DEBUG
com.gdschongik.gdsc.domain.*.api.*: info
3 changes: 1 addition & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ spring:

logging:
level:
com.gdschongik.gdsc.domain.*.api.*: debug
com.gdschongik.gdsc.infra.feign: debug
com.gdschongik.gdsc.domain.*.api.*: info

0 comments on commit e60e0d9

Please sign in to comment.