Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i print the execute sql? #1119

Closed
kkrgwbj opened this issue May 14, 2018 · 4 comments
Closed

how can i print the execute sql? #1119

kkrgwbj opened this issue May 14, 2018 · 4 comments
Labels

Comments

@kkrgwbj
Copy link

kkrgwbj commented May 14, 2018

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

@kkrgwbj kkrgwbj changed the title how car i print the execute sql? how can i print the execute sql? May 14, 2018
@qualidafial
Copy link
Member

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);

@fride
Copy link

fride commented May 28, 2020

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?)

@leaumar
Copy link

leaumar commented May 28, 2020

@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.

@fride
Copy link

fride commented May 29, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants