Skip to content

Commit 8306699

Browse files
committed
chore: 알림 읽음 디버그 로그 추가
1 parent ef5a6ec commit 8306699

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/com/example/cp_main_be/domain/member/notification/service/NotificationService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ private String makeTimeIncludeId(Long userId) {
206206
public List<NotificationResponse> getNotifications(Long userId) {
207207
List<Notification> notifications =
208208
notificationRepository.findAllByReceiverIdOrderByCreatedAtDesc(userId);
209+
long unreadCount = notifications.stream().filter(notification -> !notification.isRead()).count();
210+
log.info(
211+
"[NOTIFICATION_FETCH] userId={}, totalCount={}, unreadCount={}",
212+
userId,
213+
notifications.size(),
214+
unreadCount);
209215
return notifications.stream().map(NotificationResponse::from).collect(Collectors.toList());
210216
}
211217

0 commit comments

Comments
 (0)