Skip to content

Commit 640c6d4

Browse files
committed
restore some logging
1 parent fdfb038 commit 640c6d4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

client/src/main/java/io/split/engine/sse/AuthApiClientImp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ public AuthenticationResponse Authenticate() {
4646
return getSuccessResponse(jsonContent);
4747
}
4848

49-
_log.debug(String.format("Problem to connect to : %s. Response status: %s", _target, statusCode));
49+
_log.error(String.format("Problem to connect to : %s. Response status: %s", _target, statusCode));
5050
if (statusCode >= HttpStatus.SC_BAD_REQUEST && statusCode < HttpStatus.SC_INTERNAL_SERVER_ERROR) {
5151
return new AuthenticationResponse(false,false);
5252
}
5353

5454
return new AuthenticationResponse(false,true);
5555
} catch (Exception ex) {
56-
_log.debug(ex.getMessage());
56+
_log.error(ex.getMessage());
5757
return new AuthenticationResponse(false,true);
5858
}
5959
}

client/src/main/java/io/split/engine/sse/EventSourceClientImp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ public boolean start(String channelList, String token) {
6565
try {
6666
return _sseClient.open(buildUri(channelList, token));
6767
} catch (URISyntaxException e) {
68-
_log.debug("Error building Streaming URI: " + e.getMessage());
68+
_log.error("Error building Streaming URI: " + e.getMessage());
6969
return false;
7070
}
7171
}
7272

7373
@Override
7474
public void stop() {
7575
if (!_sseClient.isOpen()) {
76-
_log.debug("Event Source Client is closed.");
76+
_log.info("Event Source Client is closed.");
7777
return;
7878
}
7979
_sseClient.close();

client/src/main/java/io/split/engine/sse/client/SSEClient.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public SSEClient(Function<RawEvent, Void> eventCallback,
6565

6666
public synchronized boolean open(URI uri) {
6767
if (isOpen()) {
68-
_log.debug("SSEClient already open.");
68+
_log.info("SSEClient already open.");
6969
return false;
7070
}
7171

@@ -79,7 +79,7 @@ public synchronized boolean open(URI uri) {
7979
}
8080
} catch (InterruptedException e) {
8181
Thread.currentThread().interrupt();
82-
_log.debug(e.getMessage());
82+
_log.info(e.getMessage());
8383
return false;
8484
}
8585
return isOpen();
@@ -96,7 +96,7 @@ public synchronized void close() {
9696
_ongoingRequest.get().abort();
9797
_ongoingResponse.get().close();
9898
} catch (IOException e) {
99-
_log.debug(String.format("Error closing SSEClient: %s", e.getMessage()));
99+
_log.info(String.format("Error closing SSEClient: %s", e.getMessage()));
100100
}
101101
}
102102
}
@@ -127,7 +127,7 @@ private void connectAndLoop(URI uri, CountDownLatch signal) {
127127
_statusCallback.apply(StatusMessage.RETRYABLE_ERROR);
128128
return;
129129
} catch (IOException exc) { // Other type of connection error
130-
_log.debug(exc.getMessage());
130+
_log.info(String.format("SSE connection ended abruptly: %s. Retying", exc.getMessage()));
131131
_statusCallback.apply(StatusMessage.RETRYABLE_ERROR);
132132
return;
133133
}
@@ -159,7 +159,7 @@ private boolean establishConnection(URI uri, CountDownLatch signal) {
159159
_state.set(ConnectionState.OPEN);
160160
_statusCallback.apply(StatusMessage.CONNECTED);
161161
} catch (IOException exc) {
162-
_log.debug(String.format("Error establishConnection: %s", exc));
162+
_log.error(String.format("Error establishConnection: %s", exc));
163163
return false;
164164
} finally {
165165
signal.countDown();

0 commit comments

Comments
 (0)