Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Logging Statements

Mirro Mutth edited this page Feb 15, 2024 · 1 revision

Use the io.asyncer.r2dbc.mysql.QUERY logger and the DEBUG log level to log statements and their bound parameters (if it is prepared statement).

For example, in logback.xml:

<configuration>
    <!-- ... -->
    <logger name="io.asyncer.r2dbc.mysql" level="INFO"/> <!-- or DEBUG if necessary -->
    <logger name="io.asyncer.r2dbc.mysql.QUERY" level="DEBUG"/>
    <!-- ... -->
</configuration>

Note that it will print the SQL statement and all parameters, so this may be a security risk. Don't use it in an environment with sensitive data. It should be used for debugging purposes only.

The log format may be different for server preparation and client preparation. This is because the actual generated statements and commands are different in these two modes. For example, a server-preparing statement has its statement ID that's generated by server, but client-preparing does not.

Clone this wiki locally
Morty Proxy This is a proxified and sanitized view of the page, visit original site.