What is the best way to set cassandra.logdir

时间:2016-02-12 20:22:08

标签: logging cassandra

I've place cassandra software in This is a new line=?xxx What's All Log files should be placed in /home/user.

Cassandra has the file conf/logback.xml which includes parameters for determining of file log paths.

For instance:

/data/log

What is the bay way to set or change only ${cassandra.logdir}/system.log somewhere?

1 个答案:

答案 0 :(得分:3)

典型的方法是使用-Dcassandra.logdir=/data/log将其设置为系统属性。以这种方式设置了许多cassandra属性,通常在cassandra-env.sh中 - 您将通过附加到JVM_OPTS变量来查看它们的配置:

JVM_OPTS="$JVM_OPTS -Dcassandra.logdir=/data/log"