From 9be277a8105eb642866c961d9352a9a3375ac2f3 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 14 Sep 2020 21:14:51 +1000 Subject: [PATCH] debug log full stacktraces only in processConnectionError and processHandlerError Signed-off-by: Lachlan Roberts --- .../websocket/core/internal/WebSocketConnection.java | 2 +- .../websocket/core/internal/WebSocketCoreSession.java | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java b/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java index 273307378cb..640da934bdf 100644 --- a/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java +++ b/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketConnection.java @@ -470,7 +470,7 @@ public class WebSocketConnection extends AbstractConnection implements Connectio catch (Throwable t) { if (LOG.isDebugEnabled()) - LOG.debug("Error during fillAndParse()", t); + LOG.debug("Error during fillAndParse() {}", t.toString()); if (networkBuffer != null) { diff --git a/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java b/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java index 056b24d4cac..8e87a622654 100644 --- a/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java +++ b/jetty-websocket/websocket-core-common/src/main/java/org/eclipse/jetty/websocket/core/internal/WebSocketCoreSession.java @@ -391,7 +391,7 @@ public class WebSocketCoreSession implements IncomingFrames, CoreSession, Dumpab public void processConnectionError(Throwable cause, Callback callback) { if (LOG.isDebugEnabled()) - LOG.debug("processConnectionError {} {}", this, cause.toString()); + LOG.debug("processConnectionError {}", this, cause); int code; if (cause instanceof CloseException) @@ -425,7 +425,7 @@ public class WebSocketCoreSession implements IncomingFrames, CoreSession, Dumpab public void processHandlerError(Throwable cause, Callback callback) { if (LOG.isDebugEnabled()) - LOG.debug("processHandlerError {} {}", this, cause.toString()); + LOG.debug("processHandlerError {}", this, cause); int code; if (cause instanceof CloseException) @@ -554,9 +554,7 @@ public class WebSocketCoreSession implements IncomingFrames, CoreSession, Dumpab } catch (Throwable t) { - if (LOG.isDebugEnabled()) - LOG.warn("Invalid outgoing frame: {}", frame, t); - + LOG.warn("Invalid outgoing frame: {}", frame, t); callback.failed(t); return; }