diff --git a/src/main/java/balancetalk/game/dto/GameDto.java b/src/main/java/balancetalk/game/dto/GameDto.java index 01718f510..315b9c85c 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 c6850fd3b..442d25504 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/TempGameDto.java b/src/main/java/balancetalk/game/dto/TempGameDto.java index e0ac1e06b..db90554ef 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(); } diff --git a/src/main/java/balancetalk/game/dto/TempGameSetDto.java b/src/main/java/balancetalk/game/dto/TempGameSetDto.java index 276912a62..8fb81ff11 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 { diff --git a/src/main/resources/config b/src/main/resources/config index 1109d646c..5d08cd83a 160000 --- a/src/main/resources/config +++ b/src/main/resources/config @@ -1 +1 @@ -Subproject commit 1109d646c66e6335fa59605cd5b705f8462948ef +Subproject commit 5d08cd83ae9e96930cbb405f6dc43c03864f13a8 diff --git a/src/main/resources/logs/log4j2-prod.yml b/src/main/resources/logs/log4j2-prod.yml new file mode 100644 index 000000000..9f9d1db74 --- /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: picko-prod + additivity: false + level: info + includeLocation: false + AppenderRef: + ref: RollingFile_Appender \ No newline at end of file