Browse Source

refactor logs

activeAddress
Javier 9 years ago
parent
commit
e622e28c76
  1. 8
      lib/pushnotificationsservice.js

8
lib/pushnotificationsservice.js

@ -98,7 +98,7 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
var notifType = PUSHNOTIFICATIONS_TYPES[notification.type];
if (!notifType) return cb();
log.debug('### Notification received: ' + notification.type);
log.debug('Notification received: ' + notification.type);
log.debug(JSON.stringify(notification));
self._checkShouldSendNotif(notification, function(err, should) {
@ -139,7 +139,11 @@ PushNotificationsService.prototype._sendPushNotifications = function(notificatio
function(opts, next) {
self._makeRequest(opts, function(err, response) {
if (err) log.error(err);
if (response) log.debug('Request status : ', response.statusCode);
if (response) {
log.debug('Request status: ', response.statusCode);
log.debug('Request message: ', response.statusMessage);
log.debug('Request body: ', response.request.body);
}
next();
});
},

Loading…
Cancel
Save