From e622e28c7688aa41a4b6fe5b382ca18dafe44971 Mon Sep 17 00:00:00 2001 From: Javier Date: Fri, 29 Jan 2016 10:02:44 -0300 Subject: [PATCH] refactor logs --- lib/pushnotificationsservice.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/pushnotificationsservice.js b/lib/pushnotificationsservice.js index b8ca031..b7e70a5 100644 --- a/lib/pushnotificationsservice.js +++ b/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(); }); },