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

밸런스 게임 조회 시 파일 id 필드 추가 #819

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 2 additions & 1 deletion src/main/java/balancetalk/game/dto/GameDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ public static GameMyPageResponse from(Game game, GameVote vote, String imgA, Str
public static List<GameOptionDto> getGameOptionDtos(Game game, Map<Long, String> 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();
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/balancetalk/game/dto/GameOptionDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/balancetalk/game/dto/TempGameSetDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import lombok.Data;

public class TempGameSetDto {

@Data
public static class CreateTempGameSetRequest {

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config
41 changes: 41 additions & 0 deletions src/main/resources/logs/log4j2-prod.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서비스 이름이 PICK-O로 바뀐만큼 picko-prod로 하는게 좋을 것 같은데, 이렇게 변경했을 때 문제가 있어서 balancetalk으로 하신걸까요?

additivity: false
level: info
includeLocation: false
AppenderRef:
ref: RollingFile_Appender
Loading