@@ -103,7 +103,7 @@ public class LiveWebSocket {
@OnError
public void onError(Session session, Throwable error) {
// 异常处理
- log.error(String.format("sessionId[%S]的服务端发生了错误:[%S]", session.getId(), error.getMessage()));
+ log.error(String.format("sessionId[%S]的服务端发生了错误:[%S]", session.getId(), error));
}
@OnClose
@@ -39,6 +39,7 @@ public class WebsocketCommon {
} catch (Exception e) {
log.error(String.format("send message [%S] to [%S] throw exception [%S]:", message, toUserId, e));
+ log.info("send message success");
/**