now printing the String variable query don't have values. i tried if i can interpolate the parameters with the string.
still not sure how to achieve that. please help me resolve this issue. because logging the queries being executed is crucial to the application.
Even down to the query.log into the DB, you will see the parametrized query plus parameters. Up in your application layer, you can create you own interpolation of query and parameters in order to log so. Something like: