One thing you can do is to insert the P6Spy database driver into your app
-- this jdbc driver wrapper will provide logging at the jdbc level, which
would let you see what's going on without having to enable java logging.
-- this jdbc driver wrapper will provide logging at the jdbc level, which
would let you see what's going on without having to enable java logging.
There's actually (commented-out) code for that in com/p6spy/engine/common/P6LogQuery.java.
Maybe do that only if the statement is the one that shouldn't happen so you don't get huge logs.
HTH
Jo