cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: use parameterized logging
Date Wed, 11 Mar 2015 06:03:21 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk be13d35b2 -> f3399a292


use parameterized logging


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f3399a29
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f3399a29
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f3399a29

Branch: refs/heads/trunk
Commit: f3399a292e64a8a00d4240e1c9395c65caa1ad92
Parents: be13d35
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Wed Mar 11 02:03:11 2015 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Wed Mar 11 02:03:11 2015 -0400

----------------------------------------------------------------------
 .../apache/cassandra/io/sstable/format/SSTableReader.java    | 4 ++--
 src/java/org/apache/cassandra/service/CassandraDaemon.java   | 2 +-
 src/java/org/apache/cassandra/utils/SigarLibrary.java        | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3399a29/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
index e296f35..65d539f 100644
--- a/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java
@@ -279,11 +279,11 @@ public abstract class SSTableReader extends SSTable implements SelfRefCounted<SS
                 if (cardinality != null)
                     cardinalities.add(cardinality);
                 else
-                    logger.debug("Got a null cardinality estimator in: "+sstable.getFilename());
+                    logger.debug("Got a null cardinality estimator in: {}", sstable.getFilename());
             }
             catch (IOException e)
             {
-                logger.warn("Could not read up compaction metadata for " + sstable, e);
+                logger.warn("Could not read up compaction metadata for {}", sstable, e);
             }
         }
         long totalKeyCountBefore = 0;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3399a29/src/java/org/apache/cassandra/service/CassandraDaemon.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 5c18cde..036ac4c 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -522,7 +522,7 @@ public class CassandraDaemon
             else
             {
                 if (runManaged)
-                    logger.error("Exception encountered during startup: " + e.getMessage());
+                    logger.error("Exception encountered during startup: {}", e.getMessage());
                 // try to warn user on stdout too, if we haven't already detached
                 System.err.println(e.getMessage());
                 exitOrFail(3, "Exception encountered during startup: " + e.getMessage());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f3399a29/src/java/org/apache/cassandra/utils/SigarLibrary.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/SigarLibrary.java b/src/java/org/apache/cassandra/utils/SigarLibrary.java
index bcd4021..be85977 100644
--- a/src/java/org/apache/cassandra/utils/SigarLibrary.java
+++ b/src/java/org/apache/cassandra/utils/SigarLibrary.java
@@ -81,7 +81,7 @@ public class SigarLibrary
         }
         catch (SigarException sigarException)
         {
-            logger.warn("Could not determine if max processes was acceptable. Error message:
" + sigarException);
+            logger.warn("Could not determine if max processes was acceptable. Error message:
{}", sigarException);
             return false;
         }
     }
@@ -102,7 +102,7 @@ public class SigarLibrary
         }
         catch (SigarException sigarException)
         {
-            logger.warn("Could not determine if max open file handle limit is correctly configured.
Error message: " + sigarException);
+            logger.warn("Could not determine if max open file handle limit is correctly configured.
Error message: {}", sigarException);
             return false;
         }
     }
@@ -127,7 +127,7 @@ public class SigarLibrary
         }
         catch (SigarException sigarException)
         {
-            logger.warn("Could not determine if VirtualMemoryMax was acceptable. Error message:
" + sigarException);
+            logger.warn("Could not determine if VirtualMemoryMax was acceptable. Error message:
{}", sigarException);
             return false;
         }
     }
@@ -149,7 +149,7 @@ public class SigarLibrary
         }
         catch (SigarException sigarException)
         {
-            logger.warn("Could not determine if swap configuration is acceptable. Error message:
" + sigarException);
+            logger.warn("Could not determine if swap configuration is acceptable. Error message:
{}", sigarException);
             return false;
         }
     }


Mime
View raw message