Without changing anything in my code is there a way to tell JDBC to print any query executed by Statement#executeUpdate(...) and Statement#execute(...)?
It would be really useful for debugging purposes.
Yes. Use a wrapper around the actual driver like P6Spy. There are probably other tools in the same league.
EDIT: P6Spy seems to be dead. But I also found JDBCGrabber.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With