Skip to content

Commit

Permalink
Dial up to info
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdanfox committed Apr 15, 2020
1 parent 32f4ec5 commit ee1cdd4
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static final class CloseableClient implements Closeable {
PoolingHttpClientConnectionManager pool,
ResponseLeakDetector leakDetector,
@Nullable ExecutorService executor) {
log.debug("Apache client created", SafeArg.of("name", name));
log.info("Apache client created", SafeArg.of("name", name));
this.name = name;
this.client = client;
this.pool = pool;
Expand All @@ -172,15 +172,13 @@ public static final class CloseableClient implements Closeable {
@Override
public void close() throws IOException {
PoolStats poolStats = pool.getTotalStats();
if (log.isDebugEnabled()) {
log.debug(
"Closing Apache client",
SafeArg.of("name", name),
SafeArg.of("idle", poolStats.getAvailable()),
SafeArg.of("leased", poolStats.getLeased()),
SafeArg.of("pending", poolStats.getPending()),
new SafeRuntimeException("Exception for stacktrace"));
}
log.info(
"Closing Apache client",
SafeArg.of("name", name),
SafeArg.of("idle", poolStats.getAvailable()),
SafeArg.of("leased", poolStats.getLeased()),
SafeArg.of("pending", poolStats.getPending()),
log.isDebugEnabled() ? new SafeRuntimeException("Exception for stacktrace") : null);
client.close();
}

Expand Down

0 comments on commit ee1cdd4

Please sign in to comment.