-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Suppress warning message on connection death #70
Comments
You can suppress these if you want. But you might not get these with the latest version (1.3.8), because the isConnectionAlive() test was allowing some dead connection through, when they should have been terminated before returning them to the user. But you might also want to make sure your |
How do I suppress the warning messages? I didn't see a configuration setting. |
You would do it through your logging framework. For example, in log4j (property file): log4j.logger.com.zaxxer.hikari.proxy=ERROR that will suppress logs that are less than ERROR (eg. WARN, INFO, DEBUG) for the classes in package |
Is a dead connection the only warning HikariCP will throw? |
The only other one is if you are using the leak detection feature. So, if you want to specifically target that message as much as possible, use: log4j.logger.com.zaxxer.hikari.proxy.ConnectionProxy=ERROR The leak detection is logged from another class, so would not be suppressed by that configuration. |
So I had a connection die and HikariCP threw two huge warning messages into my log. Can I either suppress these or replace them with my own message? I don't really care if a connection sitting idle in the pool died, since a new one will just take its place. The first two lines from the two stack traces are below:
The text was updated successfully, but these errors were encountered: