aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/main/java/com/juick')
-rw-r--r--juick-notifications/src/main/java/com/juick/components/Notifications.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/juick-notifications/src/main/java/com/juick/components/Notifications.java b/juick-notifications/src/main/java/com/juick/components/Notifications.java
index 7bb81530d..129934188 100644
--- a/juick-notifications/src/main/java/com/juick/components/Notifications.java
+++ b/juick-notifications/src/main/java/com/juick/components/Notifications.java
@@ -41,6 +41,8 @@ import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.apache.http.util.TextUtils;
import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.env.Environment;
@@ -55,8 +57,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ExecutorService;
-import java.util.logging.Level;
-import java.util.logging.Logger;
/**
*
@@ -64,7 +64,7 @@ import java.util.logging.Logger;
*/
public class Notifications implements DisposableBean, Stream.StreamListener, MessageListener {
- private static Logger logger = Logger.getLogger(Notifications.class.getName());
+ private static Logger logger = LoggerFactory.getLogger(Notifications.class);
String wns_application_sip;
String wns_client_secret;
@@ -101,7 +101,7 @@ public class Notifications implements DisposableBean, Stream.StreamListener, Mes
xmpp.addListener((Stream.StreamListener) this);
xmpp.addListener((MessageListener) this);
} catch (IOException e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
+ logger.error(e.getMessage(), e);
}
}
@@ -111,7 +111,7 @@ public class Notifications implements DisposableBean, Stream.StreamListener, Mes
}
@Override
- public void onStreamFail(Exception e) {logger.log(Level.SEVERE, "XMPP STREAM FAIL", e);}
+ public void onStreamFail(Exception e) {logger.error("XMPP STREAM FAIL", e);}
@Override
public void onMessage(com.juick.xmpp.Message msg) {
@@ -144,9 +144,9 @@ public class Notifications implements DisposableBean, Stream.StreamListener, Mes
logger.info("RES " + i + ": " + results.get(i).toString());
}
} catch (IOException e) {
- logger.log(Level.SEVERE, e.getMessage(), e);
+ logger.error(e.getMessage(), e);
} catch (IllegalArgumentException err) {
- logger.warning("Android: Invalid API Key");
+ logger.warn("Android: Invalid API Key");
}
} else {
logger.info("GMS: no recipients");
@@ -188,13 +188,13 @@ public class Notifications implements DisposableBean, Stream.StreamListener, Mes
+ "<command arguments=\"?mid=" + jmsg.getMID() + "\" />"
+ "</commands>"
+ "</toast>";
- logger.fine(xml);
+ logger.trace(xml);
for (String url : urls) {
logger.info("WNS: " + url);
sendWNS(wnsToken, url, xml);
}
} catch (IOException | IllegalStateException e) {
- logger.log(Level.SEVERE, "WNS: ", e);
+ logger.error("WNS: ", e);
}
}