From 976edea705e5b6b71ee3173c69b619bc2ab0978a Mon Sep 17 00:00:00 2001 From: jschoi-96 Date: Fri, 20 Dec 2024 00:19:08 +0900 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20log=20prod=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/logs/log4j2-prod.yml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/main/resources/logs/log4j2-prod.yml diff --git a/src/main/resources/logs/log4j2-prod.yml b/src/main/resources/logs/log4j2-prod.yml new file mode 100644 index 00000000..07e4523e --- /dev/null +++ b/src/main/resources/logs/log4j2-prod.yml @@ -0,0 +1,41 @@ +Configuration: + name: Logger-prod + status: info + + Appenders: + RollingFile: + name: RollingFile_Appender + fileName: ${sys:LOG_DIR}/logfile.log + filePattern: "${sys:LOG_DIR}/logfile-%d{yyyy-MM-dd}.%i.txt" + PatternLayout: + pattern: "%style{%d{yyyy-MM-dd HH:mm:ss.SSS}{GMT+9}}{cyan} %highlight{[%-5p]}{FATAL=bg_red, + ERROR=red, INFO=green, DEBUG=blue, TRACE=bg_yellow} [%C] %style{[%t]}{yellow}- %m%n" + # immediateFlush: false # async 방식으로 버퍼를 통해 로그 남기기 + + Policies: + SizeBasedTriggeringPolicy: + size: "10 MB" + TimeBasedTriggeringPolicy: + Interval: 1 # 하루마다 rollover 발생 + modulate: true + + DefaultRollOverStrategy: + max: 10 + Delete: + basePath: ${sys:LOG_DIR} + maxDepth: "1" # 디렉토리 깊이 + IfLastModified: + age: "P7D" # 파일을 7일동안 보관 + + Loggers: + Root: + level: info + AppenderRef: + ref: RollingFile_Appender + Logger: + name: balancetalk-prod + additivity: false + level: info + includeLocation: false + AppenderRef: + ref: RollingFile_Appender \ No newline at end of file From ec2cd4076490f176d0d6a8b6635de7307cc33075 Mon Sep 17 00:00:00 2001 From: jschoi-96 Date: Fri, 20 Dec 2024 00:20:14 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=EB=B0=B8=EB=9F=B0=EC=8A=A4=20?= =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=EC=A1=B0=ED=9A=8C=20=EC=8B=9C=20fileId=20?= =?UTF-8?q?=ED=95=84=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/balancetalk/game/dto/GameDto.java | 3 ++- src/main/java/balancetalk/game/dto/GameOptionDto.java | 3 ++- src/main/java/balancetalk/game/dto/TempGameSetDto.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/balancetalk/game/dto/GameDto.java b/src/main/java/balancetalk/game/dto/GameDto.java index 01718f51..315b9c85 100644 --- a/src/main/java/balancetalk/game/dto/GameDto.java +++ b/src/main/java/balancetalk/game/dto/GameDto.java @@ -221,8 +221,9 @@ public static GameMyPageResponse from(Game game, GameVote vote, String imgA, Str public static List getGameOptionDtos(Game game, Map gameOptionImgUrls) { return game.getGameOptions().stream() .map(option -> { + Long fileId = option.getImgId(); String imgUrl = gameOptionImgUrls.get(option.getId()); - return GameOptionDto.fromEntity(option, imgUrl); + return GameOptionDto.fromEntity(option, fileId, imgUrl); }) .toList(); } diff --git a/src/main/java/balancetalk/game/dto/GameOptionDto.java b/src/main/java/balancetalk/game/dto/GameOptionDto.java index c6850fd3..442d2550 100644 --- a/src/main/java/balancetalk/game/dto/GameOptionDto.java +++ b/src/main/java/balancetalk/game/dto/GameOptionDto.java @@ -35,10 +35,11 @@ public class GameOptionDto { @Schema(description = "선택지", example = "A") private VoteOption optionType; - public static GameOptionDto fromEntity(GameOption gameOption, String imgUrl) { + public static GameOptionDto fromEntity(GameOption gameOption, Long fileId, String imgUrl) { return GameOptionDto.builder() .id(gameOption.getId()) .name(gameOption.getName()) + .fileId(fileId) .imgUrl(imgUrl) .description(gameOption.getDescription()) .optionType(gameOption.getOptionType()) diff --git a/src/main/java/balancetalk/game/dto/TempGameSetDto.java b/src/main/java/balancetalk/game/dto/TempGameSetDto.java index 276912a6..8fb81ff1 100644 --- a/src/main/java/balancetalk/game/dto/TempGameSetDto.java +++ b/src/main/java/balancetalk/game/dto/TempGameSetDto.java @@ -15,7 +15,7 @@ import lombok.Data; public class TempGameSetDto { - + @Data public static class CreateTempGameSetRequest { From 0084015e6ccda2f630d96ef77a25dd87a9c72f15 Mon Sep 17 00:00:00 2001 From: jschoi-96 Date: Fri, 20 Dec 2024 00:20:31 +0900 Subject: [PATCH 3/5] =?UTF-8?q?chore:=20submodule=20=EC=B5=9C=EC=8B=A0?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config b/src/main/resources/config index 1109d646..5d08cd83 160000 --- a/src/main/resources/config +++ b/src/main/resources/config @@ -1 +1 @@ -Subproject commit 1109d646c66e6335fa59605cd5b705f8462948ef +Subproject commit 5d08cd83ae9e96930cbb405f6dc43c03864f13a8 From 07da7b54ce85d9bad0be0ddf833a2b6fe40e228e Mon Sep 17 00:00:00 2001 From: jschoi-96 Date: Fri, 20 Dec 2024 00:24:13 +0900 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=EB=B3=80=EC=88=98=EB=A5=BC=20?= =?UTF-8?q?=EC=84=A0=EC=96=B8=ED=95=98=EC=97=AC=20=EA=B0=80=EB=8F=85?= =?UTF-8?q?=EC=84=B1=20=EC=9E=88=EA=B2=8C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/balancetalk/game/dto/TempGameDto.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/balancetalk/game/dto/TempGameDto.java b/src/main/java/balancetalk/game/dto/TempGameDto.java index e0ac1e06..db90554e 100644 --- a/src/main/java/balancetalk/game/dto/TempGameDto.java +++ b/src/main/java/balancetalk/game/dto/TempGameDto.java @@ -59,8 +59,9 @@ public static List getTempGameOptionDtos( ) { return tempGame.getTempGameOptions().stream() .map(option -> { + Long fileId = option.getImgId(); String imgUrl = tempGameOptionImgUrls.get(option.getId()); - return TempGameOptionDto.fromEntity(option, option.getImgId(), imgUrl); + return TempGameOptionDto.fromEntity(option, fileId, imgUrl); }) .toList(); } From 560ccccc3465a26886b3527bb00a75527c7e6f2c Mon Sep 17 00:00:00 2001 From: jschoi-96 Date: Fri, 20 Dec 2024 15:40:15 +0900 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/logs/log4j2-prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/logs/log4j2-prod.yml b/src/main/resources/logs/log4j2-prod.yml index 07e4523e..9f9d1db7 100644 --- a/src/main/resources/logs/log4j2-prod.yml +++ b/src/main/resources/logs/log4j2-prod.yml @@ -33,7 +33,7 @@ Configuration: AppenderRef: ref: RollingFile_Appender Logger: - name: balancetalk-prod + name: picko-prod additivity: false level: info includeLocation: false