Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log values of query parameters in Spring Data R2DBC?

In Spring Data R2DBC I can log SQL queries by using

logging.level.org.springframework.data.r2dbc=DEBUG

in the application.properties.

However, this doesn't log the actual values that are bound as query parameters.

How can I log the actual values of query parameters in Spring Data R2DBC?

like image 379
Harold L. Brown Avatar asked Apr 01 '20 14:04

Harold L. Brown


Video Answer


1 Answers

This worked for me :

 logging:
  level:
    io.r2dbc.postgresql.QUERY: DEBUG # for queries
    io.r2dbc.postgresql.PARAM: DEBUG # for parameters

I found it here

like image 90
b.khalsi Avatar answered Sep 18 '22 07:09

b.khalsi