quarkus-jooq icon indicating copy to clipboard operation
quarkus-jooq copied to clipboard

Remove `SqlLoggerListener` as it is a utility class and shouldn't be part of the extension

Open apatrida opened this issue 2 years ago • 1 comments

The SqlLoggerListener is a utility class that shouldn't be part of the public extension.

apatrida avatar May 15 '22 19:05 apatrida

Side effect of this class and its usage during configuration of jooq renders the activation of jooq query log cumbersome and unexpected.

quarkus.log.category."org.jooq".level=DEBUG
quarkus.log.category."io.quarkiverse.jooq.sql".min-level=TRACE
quarkus.log.category."io.quarkiverse.jooq.sql".level=TRACE

https://github.com/quarkiverse/quarkus-jooq/blob/ba23c96ce0ab6979fa2af3795be974e1a3e7e06c/runtime/src/main/java/io/quarkiverse/jooq/runtime/JooqCustomContext.java#L31-L31

Moreover it then triggers duplicated lines in log

2023-10-31 14:52:15,333 DEBUG [org.joo.too.LoggerListener] (main) Executing query          : select "actor"."first_name", "actor"."last_name", ...
2023-10-31 14:52:15,337 DEBUG [org.joo.too.LoggerListener] (main) -> with bind values      : select "actor"."first_name", "actor"."last_name", ...
2023-10-31 14:52:15,338 DEBUG [io.qua.joo.sql.SqlLoggerListener] (main) <<SQL>>                  : select "actor"."first_name", "actor"."last_name" ...

https://www.jooq.org/doc/latest/manual/sql-execution/logging/

Perdjesk avatar Oct 31 '23 14:10 Perdjesk