add log for apns
This commit is contained in:
@@ -256,6 +256,9 @@ public class ApnsServer {
|
|||||||
pushNotification = new SimpleApnsPushNotification(pushMessage.voipDeviceToken, pushMessage.packageName + ".voip", payload, c.getTime(), DeliveryPriority.IMMEDIATE, PushType.VOIP, collapseId);
|
pushNotification = new SimpleApnsPushNotification(pushMessage.voipDeviceToken, pushMessage.packageName + ".voip", payload, c.getTime(), DeliveryPriority.IMMEDIATE, PushType.VOIP, collapseId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SimpleApnsPushNotification simpleApnsPushNotification = (SimpleApnsPushNotification)pushNotification;
|
||||||
|
LOG.info("CollapseId:{}", simpleApnsPushNotification.getCollapseId());
|
||||||
|
|
||||||
if (service == null) {
|
if (service == null) {
|
||||||
LOG.error("Service not exist!!!!");
|
LOG.error("Service not exist!!!!");
|
||||||
return;
|
return;
|
||||||
@@ -274,6 +277,9 @@ public class ApnsServer {
|
|||||||
sendNotificationFuture.getNow();
|
sendNotificationFuture.getNow();
|
||||||
if(!pushNotificationResponse.isAccepted()) {
|
if(!pushNotificationResponse.isAccepted()) {
|
||||||
LOG.error("apns push failure: {}", pushNotificationResponse.getRejectionReason());
|
LOG.error("apns push failure: {}", pushNotificationResponse.getRejectionReason());
|
||||||
|
} else {
|
||||||
|
LOG.info("push success: {}", pushNotificationResponse.getApnsId().toString());
|
||||||
|
LOG.info("token invalidate timestamp: {}", pushNotificationResponse.getTokenInvalidationTimestamp());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Something went wrong when trying to send the notification to the
|
// Something went wrong when trying to send the notification to the
|
||||||
|
|||||||
Reference in New Issue
Block a user