This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Have you tried log4jdbc? This library acts as a jdbc driver, logs the statements and delegates the request to underlying real driver.
Joined: Jun 03, 2008
Unfortunately I am looking for a solution which will allow me to produce the log entries (using our company's bespoke logging library), rather than delegating the logging responsibility to another library.
I notice that the OraclePreparedStatement has a method called getRevisedSql(). I am guessing this provides what I need. Unfortunately I am using Commons DBCP, which means I only have access to DelegatingPreparedStatements which wrap the OraclePreparedStatements and so I have no access to this method.