I've a Dropwizard application using JDBI and SQL Server. I would like to get all SQL statements logged with their parameters but I don't seem to be able to.
This is what's usually recommended to do:
logging:
level: INFO
loggers:
"org.skife": TRACE
"com.microsoft.sqlserver.jdbc": TRACE
But this only logs statements, without the parameters:
TRACE [2016-07-08 16:40:27,711] org.skife.jdbi.v2.DBI: statement:[/* LocationDAO.detail */ EXEC [api].[GetCountryCodes] @CountryId = ?] took 487 millis
DEBUG [2016-07-08 16:37:44,499] com.microsoft.sqlserver.jdbc.Connection: ENTRY /* LocationDAO.detail */ EXEC [api].[GetCountryCodes] @CountryId = ?
Is there any way to get the actual statement run against the database?