From be5c5b0ec0574ff13f4ff2ecd7fb10490bfecbe2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 3 Jan 2016 10:13:34 +0300 Subject: fix logging --- src/main/java/com/juick/PushComponent.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/juick') 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 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 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"); } } -- cgit v1.2.3