Skip to content

Commit

Permalink
logging(discord): discord쪽 로깅하기
Browse files Browse the repository at this point in the history
  • Loading branch information
sss4920 committed Feb 4, 2025
1 parent 076988f commit 1bbf757
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.*;

@Builder
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@ToString
public class DiscordMessage {

private String content;
Expand All @@ -22,6 +19,7 @@ public class DiscordMessage {
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@ToString
public static class Embed {

private String title;
Expand All @@ -32,6 +30,7 @@ public static class Embed {
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@ToString
public static class EmbedImage{

private String url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private DiscordMessage createErrorMessage(Exception e, String requestUrl) {
}

private DiscordMessage createAdminMessage(String file) throws IOException {
return DiscordMessage.builder()
DiscordMessage message = DiscordMessage.builder()
.content("# 😍스웨거 MFA 만들어보기")
.embeds(
List.of(
Expand All @@ -136,6 +136,8 @@ private DiscordMessage createAdminMessage(String file) throws IOException {
)
)
.build();
log.info(message.toString());
return message;
}

private String createRequestFullPath(WebRequest webRequest) {
Expand Down

0 comments on commit 1bbf757

Please sign in to comment.