|
10 | 10 | import java.util.concurrent.ConcurrentHashMap; |
11 | 11 | import java.util.concurrent.Future; |
12 | 12 | import java.util.concurrent.TimeUnit; |
| 13 | +import java.util.logging.Logger; |
13 | 14 |
|
14 | 15 | import javax.net.ssl.SSLException; |
15 | 16 |
|
16 | 17 | import com.pusher.java_websocket.handshake.ServerHandshake; |
17 | | -import org.slf4j.Logger; |
18 | | -import org.slf4j.LoggerFactory; |
19 | 18 |
|
20 | 19 | import com.google.gson.Gson; |
21 | 20 |
|
|
26 | 25 | import com.pusher.client.util.Factory; |
27 | 26 |
|
28 | 27 | public class WebSocketConnection implements InternalConnection, WebSocketListener { |
29 | | - private static final Logger log = LoggerFactory.getLogger(WebSocketConnection.class); |
| 28 | + private static final Logger log = Logger.getLogger(WebSocketConnection.class.getName()); |
30 | 29 | private static final Gson GSON = new Gson(); |
31 | 30 |
|
32 | 31 | private static final String INTERNAL_EVENT_PREFIX = "pusher:"; |
@@ -147,7 +146,7 @@ public String getSocketId() { |
147 | 146 | /* implementation detail */ |
148 | 147 |
|
149 | 148 | private void updateState(final ConnectionState newState) { |
150 | | - log.debug("State transition requested, current [" + state + "], new [" + newState + "]"); |
| 149 | + log.fine("State transition requested, current [" + state + "], new [" + newState + "]"); |
151 | 150 |
|
152 | 151 | final ConnectionStateChange change = new ConnectionStateChange(state, newState); |
153 | 152 | state = newState; |
@@ -263,7 +262,7 @@ public void run() { |
263 | 262 | @Override |
264 | 263 | public void onClose(final int code, final String reason, final boolean remote) { |
265 | 264 | if (state == ConnectionState.DISCONNECTED || state == ConnectionState.RECONNECTING) { |
266 | | - log.error("Received close from underlying socket when already disconnected." + "Close code [" |
| 265 | + log.warning("Received close from underlying socket when already disconnected." + "Close code [" |
267 | 266 | + code + "], Reason [" + reason + "], Remote [" + remote + "]"); |
268 | 267 | return; |
269 | 268 | } |
@@ -354,7 +353,7 @@ synchronized void activity() { |
354 | 353 | pingTimer = factory.getTimers().schedule(new Runnable() { |
355 | 354 | @Override |
356 | 355 | public void run() { |
357 | | - log.debug("Sending ping"); |
| 356 | + log.fine("Sending ping"); |
358 | 357 | sendMessage(PING_EVENT_SERIALIZED); |
359 | 358 | schedulePongCheck(); |
360 | 359 | } |
@@ -385,7 +384,7 @@ private synchronized void schedulePongCheck() { |
385 | 384 | pongTimer = factory.getTimers().schedule(new Runnable() { |
386 | 385 | @Override |
387 | 386 | public void run() { |
388 | | - log.debug("Timed out awaiting pong from server - disconnecting"); |
| 387 | + log.fine("Timed out awaiting pong from server - disconnecting"); |
389 | 388 |
|
390 | 389 | underlyingConnection.removeWebSocketListener(); |
391 | 390 |
|
|
0 commit comments