Skip to content

Commit

Permalink
MOA-488: 디코 웹훅 수정 시도를 위한 로깅 2
Browse files Browse the repository at this point in the history
  • Loading branch information
shin-mallang committed Mar 1, 2024
1 parent 552a6ce commit 9dbbdc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ public class DiscordWebHookClientConfig {
@Bean
public DiscordWebHookApiClient discordWebHookApiClient() {
RestClient build = RestClient.builder()
.requestInterceptor((request, body, execution) -> {
String requestBody = new String(body);
log.info("Discord WebHook API Call\n -> uri: {}\n -> body: {}", request.getURI(), requestBody);
return execution.execute(request, body);
})
.defaultStatusHandler(HttpStatusCode::isError, (request, response) -> {
String responseData = new String(response.getBody().readAllBytes());
log.error("Discord WebHook API ERROR {}", responseData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class PersonalInquiryEventHandler {
문의자 ID: %s
문의자 연락처: %s
""";

private final DiscordWebHookClient discordWebHookClient;

@TransactionalEventListener(value = PersonalInquiryCreateEvent.class, phase = AFTER_COMMIT)
Expand Down

0 comments on commit 9dbbdc4

Please sign in to comment.