Skip to content

Commit

Permalink
[CHORE] 로그 경량화를 위해 Slack 에러 발생시 SQS 관련 로그 수정 #95
Browse files Browse the repository at this point in the history
  • Loading branch information
ddongseop committed Aug 14, 2023
1 parent 577fca8 commit 5203ebf
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import sopt.org.umbba.common.sqs.dto.MessageDto;

import java.util.Map;
import java.util.Objects;
import java.util.UUID;

/**
Expand Down Expand Up @@ -51,7 +52,12 @@ public void produce(MessageDto message) {
.withMessageAttributes(createMessageAttributes(message.getType()));

amazonSqs.sendMessage(request);
log.info(MessageUtils.generate(SQS_QUEUE_REQUEST_LOG_MESSAGE, request));
if (Objects.equals(message.getType(), MessageType.SLACK)) {
log.info(MessageUtils.generate(SQS_QUEUE_REQUEST_LOG_MESSAGE, "Slack 500 Error 내용"));
} else {
log.info(MessageUtils.generate(SQS_QUEUE_REQUEST_LOG_MESSAGE, request));
}


} catch (JsonProcessingException e) {
log.error(e.getMessage(), e);
Expand Down

0 comments on commit 5203ebf

Please sign in to comment.