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

알림 전송 실패 시 로그 추가 #384

Merged
merged 2 commits into from
Sep 15, 2023
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.google.firebase.messaging.FirebaseMessagingException;
import com.google.firebase.messaging.Message;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand All @@ -20,6 +21,7 @@
@Service
@Transactional(readOnly = true)
@RequiredArgsConstructor
@Slf4j
public class FcmNotificationService implements NotificationService {

private static final String NOTIFICATION_SEND_SUCCESS = "알림 전송 성공";
Expand Down Expand Up @@ -55,6 +57,7 @@ private String makeAndSendMessage(
firebaseMessaging.send(message);
return NOTIFICATION_SEND_SUCCESS;
} catch (FirebaseMessagingException ex) {
log.error("exception type : {}, ", ex.getClass().getSimpleName(), ex);
return NOTIFICATION_SEND_FAIL;
}
}
Expand Down