Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to log generated sql executed by JOOQ

Tags:

java

sql

jooq

when executing JOOQ queries, what is the easiest way to log the generated SQL being executed to the log

like image 973
pdeva Avatar asked Nov 06 '22 15:11

pdeva


1 Answers

As mentioned in a comment, this is documented in the manual: https://www.jooq.org/doc/latest/manual/sql-execution/logging/.

So you don't have to enable DEBUG logging on the root logger, you can do it only on the org.jooq.tools.LoggerListener logger, which does all the SQL logging in jOOQ.

like image 50
knutwannheden Avatar answered Nov 12 '22 14:11

knutwannheden