This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new ac10b81  Add ability to customize cassandra log directory using 
$CASSANDRA_LOG_DIR
ac10b81 is described below

commit ac10b817313c2260fb1889e025fd719d076f7a72
Author: Mick Semb Wever <[email protected]>
AuthorDate: Mon May 27 10:19:20 2019 +1000

    Add ability to customize cassandra log directory using $CASSANDRA_LOG_DIR
    
     Patch by Zephyr Guo; Reviewed by Mick Semb Wever for CASSANDRA-15090
---
 CHANGES.txt   | 1 +
 bin/cassandra | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 0dac500..6f6bd70 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.19
+ * Add ability to customize cassandra log directory using $CASSANDRA_LOG_DIR 
(CASSANDRA-15090)
  * Skip cells with illegal column names when reading legacy sstables 
(CASSANDRA-15086)
  * Fix assorted gossip races and add related runtime checks (CASSANDRA-15059)
  * Fix mixed mode partition range scans with limit (CASSANDRA-15072)
diff --git a/bin/cassandra b/bin/cassandra
index 8264d88..bc949e0 100755
--- a/bin/cassandra
+++ b/bin/cassandra
@@ -30,6 +30,7 @@
 #   JVM_OPTS -- Additional arguments to the JVM for heap size, etc
 #   JVM_ON_OUT_OF_MEMORY_ERROR_OPT -- The OnOutOfMemoryError JVM option if 
specified
 #   CASSANDRA_CONF -- Directory containing Cassandra configuration files.
+#   CASSANDRA_LOG_DIR -- Directory containing logs(default: 
$CASSANDRA_HOME/logs).
 #
 # As a convenience, a fragment of shell is sourced in order to set one or
 # more of these variables. This so-called `include' can be placed in a 
@@ -125,6 +126,10 @@ if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
     . "$CASSANDRA_CONF/cassandra-env.sh"
 fi
 
+if [ -z "$CASSANDRA_LOG_DIR" ]; then
+  CASSANDRA_LOG_DIR=$CASSANDRA_HOME/logs
+fi
+
 # Special-case path variables.
 case "`uname`" in
     CYGWIN*|MINGW*) 
@@ -189,7 +194,7 @@ launch_service()
     props="$3"
     class="$4"
     cassandra_parms="-Dlogback.configurationFile=logback.xml"
-    cassandra_parms="$cassandra_parms -Dcassandra.logdir=$CASSANDRA_HOME/logs"
+    cassandra_parms="$cassandra_parms -Dcassandra.logdir=$CASSANDRA_LOG_DIR"
     cassandra_parms="$cassandra_parms 
-Dcassandra.storagedir=$cassandra_storagedir"
 
     if [ "x$pidpath" != "x" ]; then


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to