hibernate-orm
hibernate-orm copied to clipboard
HHH-18224 - standardize logging of database connection
https://hibernate.atlassian.net/browse/HHH-18224
Thanks for your pull request!
This pull request appears to follow the contribution rules.
› This message was automatically generated.
So the other thing I would like to see here is for
ProxoolMessageLoggerandC3P0MessageLoggergo away. I'm hoping we can get to a point where we log exactly the same sorts of info for all the various types of connection pools, at a consistent severity level, instead of logging, say, autocommit mode in one, isolation level in another, etc.Because right now C3P0 and Proxool are extremely verbose, whereas Agroal and Hikari log almost nothing.
Do you mean as part of this improvement ?
Do you mean as part of this improvement ?
Yeah
ProxoolMessageLogger
Do you mean as part of this improvement ?
Yeah
~~I kinda feel that we should do this in a separate issue; this one is about 'standardizing' DB connection logging~~
Do you mean as part of this improvement ?
Yeah
I should have also asked, do you mean just simply quit logging all the 'extra' info that c3po/proxool now spit out, or provide some means in the DatabaseConnectionInfo interface (might have to rename if we make it more generalistic) to allow for logging extra information?
I should have also asked, do you mean just simply quit logging all the 'extra' info that c3po/proxool now spit out, or provide some means in the
DatabaseConnectionInfointerface (might have to rename if we make it more generalistic) to allow for logging extra information?
The truth is I'm not sure, but remember that what's motivating all this is:
- complaints that we were logging too much stuff at INFO level, leading to Quarkus doing stuff like suppressing all our log messages, and then
- me realizing that the Agroal CP actually logs almost no information at all, compared to some other CPs.
So, first of all:
- we want to be able to get to a place where we can tell the Quarkus folks "hey, we're only logging one message and it is really important, so please stop suppressing our INFO-level messages", and
- if this is a problem in the context of Quarkus, which uses Agroal, it seems like it must be a worse problem for people using the other CPs which are even noisier.
But also to answer your question more directly: yes, I think it would be nice to include certain very generic things like:
autocommitstatus,- isolation level, and
- pool size
in the DatabaseConnectionInfo, and log it in the "one INFO-level message" that we're permitted.
Of course, which of those things is known to use is going to depend on the CP, but that's OK.