You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2020/01/02 10:29:27 UTC

[cassandra] branch cassandra-3.0 updated: Configure the GC logs directory to be the same as other C* log directories, as defined by $CASSANDRA_LOG_DIR

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 3edbb09  Configure the GC logs directory to be the same as other C* log directories, as defined by $CASSANDRA_LOG_DIR
3edbb09 is described below

commit 3edbb09e02e0efd811ea4c9c3f44b345375124d0
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Wed Jan 1 13:19:18 2020 +0100

    Configure the GC logs directory to be the same as other C* log directories, as defined by $CASSANDRA_LOG_DIR
    
     patch by Angelo Polo; reviewed by Mick Semb Wever for CASSANDRA-14306
---
 CHANGES.txt           | 1 +
 conf/cassandra-env.sh | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index f5c4935..297fad4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.20
+ * GC logs are also put under $CASSANDRA_LOG_DIR (CASSANDRA-14306)
  * Fix sstabledump's position key value when partitions have multiple rows (CASSANDRA-14721)
  * Avoid over-scanning data directories in LogFile.verify() (CASSANDRA-15364)
  * Bump generations and document changes to system_distributed and system_traces in 3.0, 3.11
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index 43f4566..aa92eac 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -121,8 +121,13 @@ case "$jvm" in
         ;;
 esac
 
+# Sets the path where logback and GC logs are written.
+if [ "x$CASSANDRA_LOG_DIR" = "x" ] ; then
+    CASSANDRA_LOG_DIR="$CASSANDRA_HOME/logs"
+fi
+
 #GC log path has to be defined here because it needs to access CASSANDRA_HOME
-JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/logs/gc.log"
+JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_LOG_DIR}/gc.log"
 
 # Here we create the arguments that will get passed to the jvm when
 # starting cassandra.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org