Hi Marcus,

The default LoggerListener will log the queries exactly as they are being
sent to the JDBC driver (and thus the server). If this request isn't really
specific to logging only, then you could turn off the generation of schema
names by specifying Settings.renderSchema = false in your Configuration
object at runtime [1] [2], or
specify <outputSchemaToDefault>true</outputSchemaToDefault> in your code
generation configuration [3]

If, however, you'd like to keep the actual SQL as it is and just generate
different log output, then turn off Settings.executeLogging = false [4] and
implement your own ExecuteListener [5]. You could take inspiration from the
jOOQ LoggerListener

Hope this helps,
Lukas

[1]
https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings
[2]
https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-render-mapping
[3]
https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-catalog-and-schema-mapping
[4]
https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-execute-logging
[5] https://www.jooq.org/doc/latest/manual/sql-execution/execute-listeners

2018-02-22 12:28 GMT+01:00 Marcus Gattinger <gattin...@gmx.de>:

> Hi,
>
> is there any possibility to customize the format of the logged executing
> query?
>
> For example assume the following default logging:
> Execute query        : select `test`.`table`.`id` from `test`.`table`
> where `test`.`table`.`fk_sid` = 43
>
> I want to make the logging more concise by omitting the database / schema
> name:
> Execute query        : select `table`.`id` from `table` where
> `table`.`fk_sid` = 43
>
> Is this possible by means of any render configuration?
>
> Kind regards,
> Marcus
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jooq-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to