Skip to content

Commit

Permalink
refactor logs
Browse files Browse the repository at this point in the history
  • Loading branch information
JDonadio committed Jan 29, 2016
1 parent b4d94da commit e622e28
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/pushnotificationsservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
});
},
Expand Down

0 comments on commit e622e28

Please sign in to comment.