Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
joostd committed Jun 19, 2015
1 parent ce87bab commit 53107ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions www/tiqr/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@
if( $id ) {
$notificationType = $userStorage->getNotificationType($id);
$notificationAddress = $userStorage->getNotificationAddress($id);
$app['monolog']->addInfo("type [$notificationType], address [$notificationAddress]");
$app['monolog']->addInfo("client has notification type [$notificationType], address [$notificationAddress]");
$translatedAddress = $tiqr->translateNotificationAddress($notificationType, $notificationAddress);
$app['monolog']->addInfo("translated address [$translatedAddress]");
$app['monolog']->addInfo("client translated address is [$translatedAddress]");
$msg = "A push notification was sent to your phone";
if ($translatedAddress) {
$result = $tiqr->sendAuthNotification($sessionKey, $notificationType, $translatedAddress);
if( !$result ) {
if( $result ) {
$app['monolog']->addInfo("sent push notification to [$translatedAddress]");
} else {
$app['monolog']->addWarning("Failure sending push notification to [$translatedAddress]");
}
} else {
Expand Down

0 comments on commit 53107ae

Please sign in to comment.