Reputation: 893
I use com.datastax.driver.core.QueryLogger
in java to display executed queries on Cassandra :
Cluster cluster = new Cluster.Builder().addContactPoints(URL).withPort(PORT)
.withoutJMXReporting()
.withoutMetrics()
.withCredentials("cassandra", "cassandra")
.build();
session = cluster.connect();
The log I get looks like :
2018-10-09 03:24:17 DEBUG NORMAL - [cluster1] [YYYY/127.0.0.1:9042] Query completed normally, took 37 ms: [4 bound values] INSERT INTO client.info (id_client,phone,address,age) VALUES (:id_client,:phone,:address,:age);
Is there a way to replace :id_client, :phone, :address, :age
by the actual values ?
Upvotes: 0
Views: 757
Reputation: 16400
If trace is enabled it will display the bound values. ie
<logger name="com.datastax.driver.core.QueryLogger.NORMAL">
<level value="TRACE"/>
</logger>
Upvotes: 2