diff --git a/backend/src/main/java/com/ody/meeting/service/MeetingService.java b/backend/src/main/java/com/ody/meeting/service/MeetingService.java index 86f9805d4..050d06d7f 100644 --- a/backend/src/main/java/com/ody/meeting/service/MeetingService.java +++ b/backend/src/main/java/com/ody/meeting/service/MeetingService.java @@ -23,7 +23,6 @@ import com.ody.util.TimeUtil; import java.time.Instant; import java.time.LocalDateTime; -import java.time.ZoneOffset; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -62,6 +61,7 @@ private void scheduleEtaNotice(Meeting meeting) { LocalDateTime etaNoticeTime = meeting.getMeetingTime().minusMinutes(ETA_NOTICE_TIME_DEFER); Instant startTime = etaNoticeTime.toInstant(TimeUtil.KST_OFFSET); taskScheduler.schedule(() -> fcmPushSender.sendNoticeMessage(noticeMessage), startTime); + log.info("{} 타입 알림 {}에 스케줄링 예약", NotificationType.ETA_NOTICE, startTime.atZone(TimeUtil.KST_OFFSET)); } private String generateUniqueInviteCode() { diff --git a/backend/src/main/java/com/ody/notification/service/FcmPushSender.java b/backend/src/main/java/com/ody/notification/service/FcmPushSender.java index b56cccb50..394401442 100644 --- a/backend/src/main/java/com/ody/notification/service/FcmPushSender.java +++ b/backend/src/main/java/com/ody/notification/service/FcmPushSender.java @@ -8,6 +8,8 @@ import com.ody.notification.domain.message.DirectMessage; import com.ody.notification.domain.message.GroupMessage; import com.ody.notification.dto.request.FcmGroupSendRequest; +import com.ody.util.TimeUtil; +import java.time.Instant; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -52,6 +54,7 @@ private void updateDepartureReminderToDone(Notification notification) { public void sendNoticeMessage(GroupMessage groupMessage) { try { FirebaseMessaging.getInstance().send(groupMessage.message()); + log.info("공지 알림 전송 | 전송 시간 : {}", Instant.now().atZone(TimeUtil.KST_OFFSET)); } catch (FirebaseMessagingException exception) { log.error("FCM 공지 전송 실패 : {}", exception.getMessage()); throw new OdyServerErrorException(exception.getMessage()); diff --git a/backend/src/main/java/com/ody/notification/service/NotificationService.java b/backend/src/main/java/com/ody/notification/service/NotificationService.java index bfe36007b..3d2547004 100644 --- a/backend/src/main/java/com/ody/notification/service/NotificationService.java +++ b/backend/src/main/java/com/ody/notification/service/NotificationService.java @@ -16,7 +16,6 @@ import com.ody.util.TimeUtil; import java.time.Instant; import java.time.LocalDateTime; -import java.time.ZoneOffset; import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -77,7 +76,7 @@ public void scheduleNotification(FcmGroupSendRequest fcmGroupSendRequest) { "{} 타입 {} 상태 알림 {}에 스케줄링 예약", fcmGroupSendRequest.notification().getType(), fcmGroupSendRequest.notification().getStatus(), - startTime + startTime.atZone(TimeUtil.KST_OFFSET) ); }