This log statements is passing along the wrong number of parameters.

When passing along a `Throwable` parameters, the calls from the LOGGER class only ever have 2 arguments: the already formatted String, and the Throwable. As can be seen in the source code of the LOGGER object.
pull/1041/head
KoenDG 7 years ago
parent 70d4907af4
commit 1d70870ab3

@ -17,11 +17,8 @@
package com.zaxxer.hikari.metrics.prometheus;
import com.zaxxer.hikari.metrics.IMetricsTracker;
import io.prometheus.client.Collector;
import io.prometheus.client.CollectorRegistry;
import io.prometheus.client.Counter;
import io.prometheus.client.Summary;
import java.util.concurrent.TimeUnit;
class PrometheusMetricsTracker implements IMetricsTracker
{

@ -476,7 +476,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
}
catch (Exception e) {
if (poolState == POOL_NORMAL) { // we check POOL_NORMAL to avoid a flood of messages if shutdown() is running concurrently
LOGGER.debug("{} - Cannot acquire connection from data source", poolName, (e instanceof ConnectionSetupException ? e.getCause() : e));
LOGGER.debug(String.format("{%s - Cannot acquire connection from data source", poolName), (e instanceof ConnectionSetupException ? e.getCause() : e));
}
return null;
}

Loading…
Cancel
Save