From a7b9df96fde1333df9f3c9e6a0765eb983c2838b Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 13 Jan 2020 11:02:11 +1100 Subject: [PATCH] cleanup WebSocket logging in EventSocket Signed-off-by: Lachlan Roberts --- .../eclipse/jetty/websocket/tests/EventSocket.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/EventSocket.java b/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/EventSocket.java index fb4ed06e0dde..23ed12a80b77 100644 --- a/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/EventSocket.java +++ b/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/EventSocket.java @@ -59,21 +59,24 @@ public void onOpen(Session session) { this.session = session; behavior = session.getPolicy().getBehavior().name(); - LOG.info("{} onOpen(): {}", toString(), session); + if (LOG.isDebugEnabled()) + LOG.debug("{} onOpen(): {}", toString(), session); open.countDown(); } @OnWebSocketMessage public void onMessage(String message) throws IOException { - LOG.info("{} onMessage(): {}", toString(), message); + if (LOG.isDebugEnabled()) + LOG.debug("{} onMessage(): {}", toString(), message); receivedMessages.offer(message); } @OnWebSocketClose public void onClose(int statusCode, String reason) { - LOG.debug("{} onClose(): {}:{}", toString(), statusCode, reason); + if (LOG.isDebugEnabled()) + LOG.debug("{} onClose(): {}:{}", toString(), statusCode, reason); closeCode = statusCode; closeReason = reason; closed.countDown(); @@ -82,7 +85,8 @@ public void onClose(int statusCode, String reason) @OnWebSocketError public void onError(Throwable cause) { - LOG.info("{} onError(): {}", toString(), cause); + if (LOG.isDebugEnabled()) + LOG.debug("{} onError(): {}", toString(), cause); failure = cause; error.countDown(); }