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

hikaricp logs exception, then rethrows it #2172

Open
hgschmie opened this issue Feb 13, 2024 · 0 comments
Open

hikaricp logs exception, then rethrows it #2172

hgschmie opened this issue Feb 13, 2024 · 0 comments

Comments

@hgschmie
Copy link

the eviction code at https://github.com/brettwooldridge/HikariCP/blob/dev/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java#L178 logs an exception that caused a connection to be marked as bad but then rethrows it.

We have some situations where we expect connection states changes caused by exception and we catch and process the exceptions accordingly (never log them, because they are normal operational state). However, HikariCP still logs them (and fills our logs).

Would it be possible to add a switch that suppresses logging the exception (the "WARN - Connection broken because of ..." is fine, just the full exception stack trace is too much)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant