Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log pool name in warn messages #60

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/com/zaxxer/hikari/HikariPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ public void releaseConnection(IHikariConnectionProxy connectionProxy)
}
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);
}
}
Expand Down Expand Up @@ -357,7 +358,7 @@ private boolean addConnection()
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;
Expand Down