GUACAMOLE-2181: Rely on automatic stack traces for debug-level logs.

This commit is contained in:
Michael Jumper committed 2025-12-08 20:24:10 -08:00
1 parent c92694c458
commit ea06e01ddd
44 files changed
+152 -243

No files matched your search

@@ -328,13 +328,12 @@ public abstract class GuacamoleHTTPTunnelServlet extends HttpServlet {
// Catch any thrown guacamole exception and attempt to pass within the
// HTTP response, logging each error appropriately.
catch (GuacamoleClientException e) {
logger.warn("HTTP tunnel request rejected: {}", e.getMessage());
logger.warn("HTTP tunnel request rejected: {}", e.getMessage(), e);
sendError(response, e.getStatus().getGuacamoleStatusCode(),
e.getStatus().getHttpStatusCode(), e.getMessage());
}
catch (GuacamoleException e) {
logger.error("HTTP tunnel request failed: {}", e.getMessage());
logger.debug("Internal error in HTTP tunnel.", e);
logger.error("HTTP tunnel request failed: {}", e.getMessage(), e);
sendError(response, e.getStatus().getGuacamoleStatusCode(),
e.getStatus().getHttpStatusCode(), "Internal server error.");
}
@@ -205,8 +205,7 @@ public abstract class GuacamoleWebSocketTunnelEndpoint extends Endpoint {
}
catch (GuacamoleException e) {
logger.error("Creation of WebSocket tunnel to guacd failed: {}", e.getMessage());
logger.debug("Error connecting WebSocket tunnel.", e);
logger.error("Creation of WebSocket tunnel to guacd failed: {}", e.getMessage(), e);
closeConnection(session, e.getStatus().getGuacamoleStatusCode(),
e.getWebSocketCode());
return;
@@ -265,8 +264,7 @@ public abstract class GuacamoleWebSocketTunnelEndpoint extends Endpoint {
// to pass within the WebSocket connection, logging
// each error appropriately.
catch (GuacamoleClientException e) {
logger.info("WebSocket connection terminated: {}", e.getMessage());
logger.debug("WebSocket connection terminated due to client error.", e);
logger.info("WebSocket connection terminated: {}", e.getMessage(), e);
closeConnection(session, e.getStatus().getGuacamoleStatusCode(),
e.getWebSocketCode());
}
@@ -275,8 +273,7 @@ public abstract class GuacamoleWebSocketTunnelEndpoint extends Endpoint {
closeConnection(session, GuacamoleStatus.SUCCESS);
}
catch (GuacamoleException e) {
logger.error("Connection to guacd terminated abnormally: {}", e.getMessage());
logger.debug("Internal error during connection to guacd.", e);
logger.error("Connection to guacd terminated abnormally: {}", e.getMessage(), e);
closeConnection(session, e.getStatus().getGuacamoleStatusCode(),
e.getWebSocketCode());
}