What is the best way to set cassandra.logdir

2019-06-25 01:22发布

I've place cassandra software in /home/user All Log files should be placed in /data/log.

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

For instance:

${cassandra.logdir}/system.log

What is the bay way to set or change only cassandra.logdir somewhere?

1条回答
啃猪蹄的小仙女
2楼-- · 2019-06-25 01:49

The typical way is to set it as a system property using -Dcassandra.logdir=/data/log . A number of cassandra properties are set in this manner, typically in cassandra-env.sh - you'll see they're configured by appending to the JVM_OPTS variable:

JVM_OPTS="$JVM_OPTS -Dcassandra.logdir=/data/log"
查看更多
登录 后发表回答