From dcba97c3cdebc4a9674d4509d06ae648d3f2bc59 Mon Sep 17 00:00:00 2001 From: Jared Stehler Date: Fri, 11 Apr 2014 13:27:48 -0400 Subject: [PATCH] log pool name in warn messages --- src/main/java/com/zaxxer/hikari/HikariPool.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zaxxer/hikari/HikariPool.java b/src/main/java/com/zaxxer/hikari/HikariPool.java index 20bc3c3a..18850e0a 100644 --- a/src/main/java/com/zaxxer/hikari/HikariPool.java +++ b/src/main/java/com/zaxxer/hikari/HikariPool.java @@ -198,7 +198,8 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener } else { - LOGGER.debug("Connection returned to pool is broken, or the pool is shutting down. Closing connection."); + LOGGER.debug("Connection returned to pool {} is broken, or the pool is shutting down. Closing connection.", + configuration.getPoolName()); closeConnection(connectionProxy); } } @@ -357,7 +358,7 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener long now = System.currentTimeMillis(); if (now - lastConnectionFailureTime > 1000 || isDebug) { - LOGGER.warn("Connection attempt to database failed (not every attempt is logged): {}", e.getMessage(), (isDebug ? e : null)); + LOGGER.warn("Connection attempt to database {} failed (not every attempt is logged): {}", configuration.getPoolName(), e.getMessage(), (isDebug ? e : null)); } lastConnectionFailureTime = now; return false;