rantav/hector — Issue #415: logging of messages sent to Cassandra
Author: hontvari
Created: 2012-02-08 18:31:22+00:00
State: open

For debugging it would be useful to be able to switch on logging of all messages sent to Cassandra, especially column insertion and deletion.
It may be useful to use a separate logger for this, not the usual one which is named by the class name, similarly to org.hibernate.SQL. Something like me.prettyprint.cassandra.message.

I would log these things in debug level, column updates to one row should be compressed into a single line. If the update affects more rows, then the log entry should contain the corresponding number of lines. The values itself in their raw format are byte arrays, the length which is logged should be restricted to about 16 bytes, so UIDs are completely readable. If possible it would be much better to format the values using the appropriate Serializers, so for example String could be readable.

Based on my experience, it seems that logging only outgoing messages is enough, it is not necessary to log the reply too. The replies are more problematic anyway, because they can be very large.