JBDC logging
Luke Hutteman writes about p6spy which "is [a] JDBC logger that sits in between your application and the real JDBC driver. It intercepts all calls to the real JDBC driver this way and subsequently logs a single line per executed SQL statement."