aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-03 10:13:34 +0300
committerGravatar Vitaly Takmazov2016-01-03 10:13:34 +0300
commitbe5c5b0ec0574ff13f4ff2ecd7fb10490bfecbe2 (patch)
tree92c8755d7db7275900918c55e2313df9ccd2f7d1 /src
parent3977558af5ec48fd84ecb79d3acad3f13763e154 (diff)
fix logging
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/PushComponent.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/com/juick/PushComponent.java b/src/main/java/com/juick/PushComponent.java
index 2102f77d..6fccce1e 100644
--- a/src/main/java/com/juick/PushComponent.java
+++ b/src/main/java/com/juick/PushComponent.java
@@ -209,13 +209,15 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
MulticastResult result = GCMSender.send(message, regids, 3);
List<Result> results = result.getResults();
for (int i = 0; i < results.size(); i++) {
- logger.fine("RES " + i + ": " + results.get(i).toString());
+ logger.info("RES " + i + ": " + results.get(i).toString());
}
} catch (IOException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
} catch (IllegalArgumentException err) {
logger.warning("Android: Invalid API Key");
}
+ } else {
+ logger.info("GMS: no recipients");
}
/*** WinPhone ***/
@@ -252,10 +254,13 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
logger.fine(xml);
for (int i = 0; i < urls.size(); i++) {
String url = urls.get(i);
- logger.fine("WNS: " + url);
+ logger.info("WNS: " + url);
sendWNS(url, xml);
}
+ } else {
+ logger.info("WNS: no recipients");
}
+
/*** iOS ***/
List<String> tokens;
@@ -273,9 +278,11 @@ public class PushComponent implements ServletContextListener, Stream.StreamListe
.withSandboxDestination().build();
for (String token : tokens) {
String payload = APNS.newPayload().alertTitle("@" + jmsg.User.UName).alertBody(jmsg.Text).build();
- logger.fine("APNS: " + token);
+ logger.info("APNS: " + token);
service.push(token, payload);
}
+ } else {
+ logger.info("APNS: no recipients");
}
}