I\'m researching spring for a possible switch to a spring stack. One of the things that I thought was cool was the ability for spring jdbc to log all the executed sql. So
How are you executing the SQL? Spring won't magically log SQL that gets sent to the database, you have to go through the appropriate channels.
For example, if you execute SQL by using JdbcTemplate
, either directly or via JdbcDaoSupport
, then yes, the SQL will be logged for some operations, but only those operations that involve direct SQL.
If you use Hibernate or prepared statements, then Spring never gets to see the SQL itself, and therefore cannot log it.
If you posted some sample code that demonstrated how you were executing your SQL, it would help a lot.