From 6517e38fb31fc1512d7dd74102d789dc588e6df5 Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Fri, 7 Mar 2014 11:52:43 +0000 Subject: [PATCH 1/2] Implement consistent logging for setters in me.prettyprint.cassandra.model.ConfigurableConsistencyLevel #656 --- .../cassandra/model/ConfigurableConsistencyLevel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java b/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java index 8cc17787f..8b9d040bc 100644 --- a/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java +++ b/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java @@ -2,7 +2,6 @@ import java.util.HashMap; import java.util.Map; - import me.prettyprint.cassandra.service.OperationType; import me.prettyprint.hector.api.HConsistencyLevel; import me.prettyprint.hector.api.ConsistencyLevelPolicy; @@ -40,10 +39,12 @@ public HConsistencyLevel get(OperationType op, String cfName) { public void setReadCfConsistencyLevels(Map columnFamilyConsistencyLevels) { this.readCfConsistencyLevels = columnFamilyConsistencyLevels; + log.info("Read ColumnFamily ConsistencyLevels set to: " + columnFamilyConsistencyLevels); } public void setWriteCfConsistencyLevels(Map columnFamilyConsistencyLevels) { this.writeCfConsistencyLevels = columnFamilyConsistencyLevels; + log.info("Write ColumnFamily ConsistencyLevels set to: " + columnFamilyConsistencyLevels); } public void setConsistencyLevelForCfOperation(HConsistencyLevel consistencyLevel, @@ -60,10 +61,12 @@ public void setConsistencyLevelForCfOperation(HConsistencyLevel consistencyLevel public void setDefaultReadConsistencyLevel(HConsistencyLevel defaultReadConsistencyLevel) { this.defaultReadConsistencyLevel = defaultReadConsistencyLevel; + log.info("Default read ConsistencyLevel set to: " + defaultReadConsistencyLevel.toString() + "."); } public void setDefaultWriteConsistencyLevel(HConsistencyLevel defaultWriteConsistencyLevel) { this.defaultWriteConsistencyLevel = defaultWriteConsistencyLevel; + log.info("Default write ConsistencyLevel set to: " + defaultWriteConsistencyLevel.toString() + "."); } From f030f981069dd96a46543208c65412b360b5074a Mon Sep 17 00:00:00 2001 From: Lewis John McGibbney Date: Fri, 7 Mar 2014 15:32:56 +0000 Subject: [PATCH 2/2] Implement consistent logging for setters in me.prettyprint.cassandra.model.ConfigurableConsistencyLevel #656 --- .../cassandra/model/ConfigurableConsistencyLevel.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java b/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java index 8b9d040bc..664a909bf 100644 --- a/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java +++ b/core/src/main/java/me/prettyprint/cassandra/model/ConfigurableConsistencyLevel.java @@ -39,12 +39,12 @@ public HConsistencyLevel get(OperationType op, String cfName) { public void setReadCfConsistencyLevels(Map columnFamilyConsistencyLevels) { this.readCfConsistencyLevels = columnFamilyConsistencyLevels; - log.info("Read ColumnFamily ConsistencyLevels set to: " + columnFamilyConsistencyLevels); + log.info("Read ColumnFamily ConsistencyLevels set to: {}", columnFamilyConsistencyLevels); } public void setWriteCfConsistencyLevels(Map columnFamilyConsistencyLevels) { this.writeCfConsistencyLevels = columnFamilyConsistencyLevels; - log.info("Write ColumnFamily ConsistencyLevels set to: " + columnFamilyConsistencyLevels); + log.info("Write ColumnFamily ConsistencyLevels set to: {}", columnFamilyConsistencyLevels); } public void setConsistencyLevelForCfOperation(HConsistencyLevel consistencyLevel, @@ -61,12 +61,12 @@ public void setConsistencyLevelForCfOperation(HConsistencyLevel consistencyLevel public void setDefaultReadConsistencyLevel(HConsistencyLevel defaultReadConsistencyLevel) { this.defaultReadConsistencyLevel = defaultReadConsistencyLevel; - log.info("Default read ConsistencyLevel set to: " + defaultReadConsistencyLevel.toString() + "."); + log.info("Default read ConsistencyLevel set to: {}", defaultReadConsistencyLevel.toString() + "."); } public void setDefaultWriteConsistencyLevel(HConsistencyLevel defaultWriteConsistencyLevel) { this.defaultWriteConsistencyLevel = defaultWriteConsistencyLevel; - log.info("Default write ConsistencyLevel set to: " + defaultWriteConsistencyLevel.toString() + "."); + log.info("Default write ConsistencyLevel set to: {}", defaultWriteConsistencyLevel.toString() + "."); }