Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging(discord): discord쪽 로깅하기 #262

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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