Jdbi: how can i print the execute sql?

Created on 14 May 2018  路  4Comments  路  Source: jdbi/jdbi

how can i print the execute sql?
@qualidafial @stevenschlansker

question

Most helpful comment

Assuming you're using 3.2.0 or later, use the SqlLogger API http://jdbi.org/apidocs/org/jdbi/v3/core/statement/SqlLogger.html

Jdbi jdbi = ...
SqlLogger myLogger = ...
jdbi.setSqlLogger(myLogger);

All 4 comments

Assuming you're using 3.2.0 or later, use the SqlLogger API http://jdbi.org/apidocs/org/jdbi/v3/core/statement/SqlLogger.html

Jdbi jdbi = ...
SqlLogger myLogger = ...
jdbi.setSqlLogger(myLogger);

I'm using version 3.13.0 and this method does not exist anymore.How do I add the logger in 3.13.0 (and this seems to be the only version available?)

@fride the SqlLogger api has not been changed or removed since release (in 2018). My personal project using jdbi 3.13.0 still calls jdbi.setSqlLogger() too.

@leaumar Ok - found the cause. Gradle used 3.0.0-beta2 even though I used the 3.12.0 bom. ;) Sorry for the inconvenience

Was this page helpful?
0 / 5 - 0 ratings

Related issues

raderio picture raderio  路  6Comments

johanneszink picture johanneszink  路  4Comments

jimmyhmiller picture jimmyhmiller  路  6Comments

rherrmann picture rherrmann  路  4Comments

bakstad picture bakstad  路  5Comments