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."
This is a single archived entry from Stefan Tilkov’s blog. For more up-to-date content, check out my author page at INNOQ, which has more information about me and also contains a list of published talks, podcasts, and articles. Or you can check out the full archive.