dovecot-2.2: cassandra: If log_level=debug/trace, log each query...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 10 13:20:38 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/539322434f9b
changeset: 18835:539322434f9b
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 10 16:18:10 2015 +0300
description:
cassandra: If log_level=debug/trace, log each query and its result.

diffstat:

 src/lib-sql/driver-cassandra.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 42cdfb0153d9 -r 539322434f9b src/lib-sql/driver-cassandra.c
--- a/src/lib-sql/driver-cassandra.c	Wed Jun 10 16:09:13 2015 +0300
+++ b/src/lib-sql/driver-cassandra.c	Wed Jun 10 16:18:10 2015 +0300
@@ -461,6 +461,11 @@
 
 	result->finished = TRUE;
 
+	if (db->log_level >= CASS_LOG_DEBUG) {
+		i_debug("cassandra: Finished query '%s': %s", result->query,
+			result->error != NULL ? result->error : "success");
+	}
+
 	i_assert((result->error != NULL) == (result->iterator == NULL));
 
 	result->api.callback = TRUE;


More information about the dovecot-cvs mailing list