Warnings are already logged by default by the JdbcTemplate
. Drawback is that you would have to enable debug logging for that class.
For log back adding this to your logback.xml
will enable it.
<logger name="org.springframework.jdbc.support.JdbcTemplate" level="DEBUG" />