[ https://issues.apache.org/jira/browse/CASSANDRA-14947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Shuler updated CASSANDRA-14947: --------------------------------------- Fix Version/s: (was: 3.11.3) 3.11.x > in the tarball download of cassandra 3.11.3 there is an issue redirecting > system.log and debug.log via $cassandra.logdir > ------------------------------------------------------------------------------------------------------------------------ > > Key: CASSANDRA-14947 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14947 > Project: Cassandra > Issue Type: Bug > Components: Local/Config > Environment: root@rockpro64_0:/srv/salt/etc/cassandra# uname -a > Linux rockpro64_0 4.4.166-rockchip64 #17 SMP Mon Dec 3 16:25:27 CET 2018 > aarch64 aarch64 aarch64 GNU/Linux > > root@rockpro64_0:/srv/salt/etc/cassandra# cat /etc/*rel* > # PLEASE DO NOT EDIT THIS FILE > BOARD=rockpro64 > BOARD_NAME="RockPro 64" > BOARDFAMILY=rockchip64 > VERSION=5.67 > LINUXFAMILY=rockchip64 > BRANCH=default > ARCH=arm64 > IMAGE_TYPE=stable > BOARD_TYPE=conf > INITRD_ARCH=arm64 > KERNEL_IMAGE_TYPE=Image > IMAGE_UUID=f8d626cb-ec73-441e-a15d-f804cc518c9f > # PLEASE DO NOT EDIT THIS FILE > BOARD=rockpro64 > BOARD_NAME="RockPro 64" > BOARDFAMILY=rockchip64 > VERSION=5.67 > LINUXFAMILY=rockchip64 > BRANCH=default > ARCH=arm64 > IMAGE_TYPE=stable > BOARD_TYPE=conf > INITRD_ARCH=arm64 > KERNEL_IMAGE_TYPE=Image > DISTRIB_ID=Ubuntu > DISTRIB_RELEASE=18.04 > DISTRIB_CODENAME=bionic > DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS" > NAME="Ubuntu" > VERSION="18.04.1 LTS (Bionic Beaver)" > ID=ubuntu > ID_LIKE=debian > PRETTY_NAME="Ubuntu 18.04.1 LTS" > VERSION_ID="18.04" > HOME_URL="https://www.ubuntu.com/" > SUPPORT_URL="https://help.ubuntu.com/" > BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" > PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" > VERSION_CODENAME=bionic > UBUNTU_CODENAME=bionic > > > Reporter: simon > Priority: Low > Fix For: 3.11.x > > > it would appear that for some reason setting an env variable of > CASSANDRA_LOG_DIR is only being picked up in cassandra-env.ps1 & > cassandra-env.sh and being passed to java for the gc.log* files. > cassandra-env.ps1: line 288: $env:CASSANDRA_PARAMS = > $env:CASSANDRA_PARAMS + " -Dcassandra.logdir=""$logdir"" > -Dcassandra.storagedir=""$storagedir""" > > However in logback.xml the same environment variable CASSANDRA_LOG_DIR is > not being picked up and passed to (${cassandra.logdir}) > while gc.log gets redirected correctly to CASSANDRA_LOG_DIR from the java > argument -Xloggc: > > the system.log and debug.log defined in logback.xml still points to > $CASSANDRA_HOME/log. > The only way I can get the debug.log and system.log log files to redirect to > $CASSANDRA_LOG_DIR > is to edit the logback.xml and change the following lines manually; > > <!-- <file>${cassandra.logdir}/system.log</file> --> > <file>/var/log/cassandra/system.log</file> > <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> > <!-- > <fileNamePattern>${cassandra.logdir}/system.log.%i.zip</fileNamePattern> --> > <fileNamePattern>/var/log/cassandra/system.log.%i.zip</fileNamePattern> > > ........ > <!-- <file>${cassandra.logdir}/debug.log</file> --> > <file>/var/log/cassandra/debug.log</file> > <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> > <!-- <fileNamePattern>${cassandra.logdir}/debug.log.%i.zip</fileNamePattern> > --> > <fileNamePattern>/var/log/cassandra/debug.log.%i.zip</fileNamePattern> > >> I don't know why the environment variable CASSANDRA_LOG_DIR is being > >> picked up by *cassandra-env.ps1 & cassandra-env.sh* > but not logback.xml > > Indeed the only way I could even get cassandra-env.sh to pick up > CASSANDRA_LOG_DIR environment variable was to make the following change to > cassandra-env.sh; > old: JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/logs/gc.log" > new: if [ "x$CASSANDRA_LOG_DIR" = "x" ]; then > JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/logs/gc.log" > else > JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_LOG_DIR}/gc.log" > fi > > -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org