clearing of SQL Warnings before making chacked-in connection available as part of pool is indisputably proper decision, but logging of all these warnings on WARNING level - not.
In reality SQL Warnings very rarely represents real warnings, as mostly they do not point or hint that something is (or may be) abnormal. Rather, they provide some additional information.
The only SQL Warning that is really standard and can be met in all (at least, almost all) databases is that UPDATE or DELETE statement has not found any records to process, which is not of greater interest that information that 1 record or 1 million records were processed.
All other SQL Warnings are highly DB-dependent. E.g. in SQL Server SQL-Warnings are used to provide some kind of debug output from server (like to println() functinality).
For this reasons forceful logging all of them on WARNING level may overflow logs with garbage, effectively hiding really important information.
In my opinion, it would be much better if log level for SQL Warnings will be configurable.
Log in to post a comment.