Skip to content

Commit

Permalink
[chore] 에러 파악을 위한 로그 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
KWY0218 committed Aug 23, 2024
1 parent 7ceb146 commit 748f8c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;

@Entity
@Getter
@Builder
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@ToString
public class User extends AuditingTimeEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
import java.util.List;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
@Slf4j
public class MeetingRetrieveService {
private final MeetingRepository meetingRepository;
private final UserRetrieveService userRetrieveService;
Expand Down Expand Up @@ -52,10 +54,15 @@ public BestMeetingTimeDto getBestMeetingTime(final Long meetingId, final Long us
);

Map<Long, User> userIdToUserMap = userRetrieveService.getUserIdToUserMap(meetingId);
log.info(
"user count is " + userCount + "\n " +
"timeBlocks is " + timeBlocks + "\n " +
"bestMeetingTimes is " + bestMeetingTimes + "\n" +
"userIdToUserMap is " + userIdToUserMap + "\n"
);
List<BestMeetingTimeWithUsers> bestMeetingTimeWithUsers = bestMeetingTimes.stream()
.map(bestMeetingTime -> mapToBestMeetingTimeWithUsers(bestMeetingTime, userIdToUserMap))
.toList();

return BestMeetingTimeDto.of(userCount, bestMeetingTimeWithUsers);
}

Expand Down

0 comments on commit 748f8c7

Please sign in to comment.