From 09221ab5695e99b2df1130ea923c39625ec85429 Mon Sep 17 00:00:00 2001
From: Alexander Alexeev
Date: Thu, 10 Nov 2016 04:50:07 +0700
Subject: using slf4j + logback for logging
---
.../src/main/java/com/juick/components/s2s/ConnectionOut.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
(limited to 'juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java')
diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java
index cedb3745..c15a2a25 100644
--- a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java
+++ b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java
@@ -18,7 +18,6 @@ import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
import java.util.UUID;
-import java.util.logging.Level;
/**
* @author ugnich
@@ -132,7 +131,7 @@ public class ConnectionOut extends Connection implements Runnable {
restartParser();
sendOpenStream();
} catch (SSLException sex) {
- logger.log(Level.SEVERE, String.format("s2s ssl error: %s %s", to, streamID), sex);
+ logger.error(String.format("s2s ssl error: %s %s", to, streamID), sex);
sendStanza("");
xmpp.removeConnectionOut(this);
closeConnection();
@@ -144,7 +143,7 @@ public class ConnectionOut extends Connection implements Runnable {
}
}
- logger.warning("STREAM TO " + to + " " + streamID + " FINISHED");
+ logger.warn("STREAM TO " + to + " " + streamID + " FINISHED");
xmpp.removeConnectionOut(ConnectionOut.this);
closeConnection();
} catch (EOFException | SocketException eofex) {
@@ -152,7 +151,7 @@ public class ConnectionOut extends Connection implements Runnable {
xmpp.removeConnectionOut(ConnectionOut.this);
closeConnection();
} catch (Exception e) {
- logger.log(Level.SEVERE, String.format("s2s out exception: %s %s", to, streamID), e);
+ logger.error(String.format("s2s out exception: %s %s", to, streamID), e);
xmpp.removeConnectionOut(ConnectionOut.this);
closeConnection();
}
@@ -162,7 +161,7 @@ public class ConnectionOut extends Connection implements Runnable {
try {
sendStanza("" + key + "");
} catch (IOException e) {
- logger.log(Level.WARNING, "STREAM TO " + to + " " + streamID + " ERROR", e);
+ logger.warn("STREAM TO " + to + " " + streamID + " ERROR", e);
}
}
}
--
cgit v1.2.3