@@ -103,7 +103,7 @@ public synchronized void stop() {
103103 try {
104104 client .close ();
105105 } catch (Exception e ) {
106- log .debug ("ws close ignored: {}" , e . getMessage () );
106+ log .debug ("ws close failed during stop" );
107107 }
108108 }
109109 if (runnerThread != null ) {
@@ -130,7 +130,7 @@ private void runLoop() {
130130 break ;
131131 } catch (Exception e ) {
132132 if (!shutdownRequested ) {
133- log .warn ("opencli ws session failed ( attempt {}): {} " , attempt , e . getMessage () );
133+ log .warn ("opencli ws session failed attempt={} " , attempt );
134134 }
135135 }
136136 if (shutdownRequested ) {
@@ -161,7 +161,7 @@ private void runOneSession() throws Exception {
161161 final CountDownLatch sessionClosed = new CountDownLatch (1 );
162162 final AtomicReference <Throwable > handshakeFailure = new AtomicReference <>();
163163
164- log .info ("opencli ws connecting: {}" , wsUrl );
164+ log .info ("opencli ws connecting" );
165165 WebSocketClient client =
166166 new WebSocketClient (URI .create (wsUrl )) {
167167 @ Override
@@ -180,7 +180,7 @@ public void onMessage(String message) {
180180 try {
181181 handleTextMessage (this , message , registered , handshakeFailure );
182182 } catch (Exception e ) {
183- log .warn ("handle ws message failed: {}" , e . getMessage () );
183+ log .warn ("handle ws message failed" );
184184 }
185185 }
186186
@@ -192,8 +192,6 @@ public void onClose(int code, String reason, boolean remote) {
192192 new IllegalStateException (
193193 "WebSocket closed before 'registered' (code="
194194 + code
195- + " reason="
196- + reason
197195 + ")" ));
198196 registered .countDown ();
199197 }
@@ -202,7 +200,7 @@ public void onClose(int code, String reason, boolean remote) {
202200
203201 @ Override
204202 public void onError (Exception ex ) {
205- log .warn ("WebSocket error: {}" , ex . toString () );
203+ log .warn ("WebSocket error" );
206204 if (registered .getCount () > 0 ) {
207205 handshakeFailure .compareAndSet (null , ex );
208206 registered .countDown ();
@@ -213,7 +211,7 @@ public void onError(Exception ex) {
213211
214212 activeClient = client ;
215213 if (!client .connectBlocking (30 , TimeUnit .SECONDS )) {
216- throw new IllegalStateException ("WebSocket connectBlocking returned false: " + wsUrl );
214+ throw new IllegalStateException ("WebSocket connectBlocking returned false" );
217215 }
218216
219217 if (!registered .await (connectionProperties .getHandshakeTimeoutMillis (), TimeUnit .MILLISECONDS )) {
@@ -334,8 +332,8 @@ private void runCollectSafe(WebSocketClient ws, JsonNode msg) {
334332 : e .getMessage ();
335333 sendResult (ws , requestId , false , Collections .<JsonNode >emptyList (), err );
336334 } catch (Exception e ) {
337- log .warn ("collect execution error request_id={}: {}" , requestId , e . getMessage () );
338- sendResult (ws , requestId , false , Collections .<JsonNode >emptyList (), e . getMessage () );
335+ log .warn ("collect execution failed" );
336+ sendResult (ws , requestId , false , Collections .<JsonNode >emptyList (), "collect execution failed" );
339337 }
340338 }
341339
@@ -408,7 +406,7 @@ private static void sendResult(
408406 }
409407 ws .send (MAPPER .writeValueAsString (out ));
410408 } catch (Exception e ) {
411- log .error ("failed to send WS result request_id={}: {}" , requestId , e . getMessage () );
409+ log .error ("failed to send WS result" );
412410 }
413411 }
414412}
0 commit comments