Skip to content

Commit

Permalink
Increase log verbosity for agent connection to forwarder
Browse files Browse the repository at this point in the history
Otherwise it is almost impossible to debug correctly.
  • Loading branch information
w.montaz committed Jul 23, 2024
1 parent 25bb5c8 commit 7229ac6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ public void establishConnection() {
}
Integer port = randomHealthyService.getService().getPort();

if (LOGGER.isDebugEnabled()) {
LOGGER.debug("will use forwarder at " + host + ":" + port);
}

if (underlying != null) {
underlying.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void establishConnection() {

boolean establishConnectionOnce() {
try {
LOGGER.debug("try connecting to {}:{}", host, port);
LOGGER.info("try connecting to {}:{}", host, port);

socket = new Socket();
socket.connect(new InetSocketAddress(host, port), CONNECTION_TIMEOUT);
Expand All @@ -57,7 +57,7 @@ boolean establishConnectionOnce() {

makeHandshake();

LOGGER.debug("connection established");
LOGGER.info("connection established to {}:{}", host, port);
connectionEstablished = true;
return true;
} catch (IOException | ProtocolVersion.InvalidFrameException | ProtocolVersion.InvalidProtocolVersionException exception) {
Expand All @@ -83,7 +83,7 @@ private void makeHandshake() throws IOException, ProtocolVersion.InvalidFrameExc
}

private void waitBeforeRetry() {
LOGGER.debug("cannot connect to {}:{}", host, port);
LOGGER.error("cannot connect to {}:{}", host, port);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Expand Down

0 comments on commit 7229ac6

Please sign in to comment.