From 493a5dd45973dce7ed1b894452743ab1afdce7d3 Mon Sep 17 00:00:00 2001 From: Erik Merkle Date: Fri, 20 Oct 2023 15:28:23 -0500 Subject: [PATCH] Add http setup logging --- .../management/http/HttpManagementConnectionFactory.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/server/src/main/java/io/cassandrareaper/management/http/HttpManagementConnectionFactory.java b/src/server/src/main/java/io/cassandrareaper/management/http/HttpManagementConnectionFactory.java index 1356778ea..22c7b8960 100644 --- a/src/server/src/main/java/io/cassandrareaper/management/http/HttpManagementConnectionFactory.java +++ b/src/server/src/main/java/io/cassandrareaper/management/http/HttpManagementConnectionFactory.java @@ -91,9 +91,9 @@ public ICassandraManagementProxy connectAny(Collection nodes) throws Reape return cassandraManagementProxy; } catch (ReaperException | RuntimeException | UnknownHostException e) { getHostConnectionCounters().decrementSuccessfulConnections(node.getHostname()); - LOG.info("Unreachable host: ", e); + LOG.info(String.format("Unreachable host. Hostname: %s", node.getHostname()), e); } catch (InterruptedException expected) { - LOG.trace("Expected exception", expected); + LOG.trace(String.format("Expected exception. Hostname: %s", node.getHostname()), expected); } } } @@ -135,8 +135,9 @@ private ICassandraManagementProxy connectImpl(Node node) @Nullable @Override public HttpCassandraManagementProxy apply(@Nullable String hostName) { - DefaultApi apiClient = new DefaultApi( - new ApiClient().setBasePath("http://" + hostName + ":" + managementPort + rootPath)); + String basePath = "http://" + hostName + ":" + managementPort + rootPath; + LOG.info("Creating HTTP client with base path: '{}'", basePath); + DefaultApi apiClient = new DefaultApi(new ApiClient().setBasePath(basePath)); InstrumentedScheduledExecutorService statusTracker = new InstrumentedScheduledExecutorService( jobStatusPollerExecutor, metricRegistry);