Conversation
This prevents unnecessary log spam in production environments.
|
@GertDE Hmmmm, why is this happening in production? This is definitely not "expected" behaviour from the perspective of the pool. |
|
@brettwooldridge I'm using Spring and catching QueryTimeoutException (query is interrupted after 1 second) in my application, but HikariCP still logs a warning, so i can`t grep for real exceptions. |
|
@GertDE What about this solution? |
|
@brettwooldridge I've addressed this locally by raising the logging level to ERROR: |
|
@GertDE It is best practice that exceptions that are eaten must be logged. https://javanexus.com/blog/handling-swallowed-exceptions-java-guide |
|
Yes, that's correct, but you're handling the exception and rethrowing it, so it's not a swallowed exception. |
This prevents unnecessary log spam in production environments.