Changing logging locations

Logging locations are set at installation. Generally, the default logs location is /var/log. For example, /var/log/cassandra and /var/log/tomcat.

You can also change logging locations with OpsCenter Configuration Profiles.

Procedure

  1. To change logging locations after installation:

    • To generate all logs in the same location, add CASSANDRA_LOG_DIR to the dse-env.sh file.

      Where is the dse-env.sh file?

      The location of the dse-env.sh file depends on the type of installation:

      Installation Type Location

      Package installations + Installer-Services installations

      /etc/dse/dse-env.sh

      Tarball installations + Installer-No Services installations

      <installation_location>/bin/dse-env.sh

      export CASSANDRA_LOG_DIR="/your/log/location"
    • For finer-grained control, edit the logback.xml file and replace ${cassandra.logdir} with the path.

      Where is the logback.xml file?

      The location of the logback.xml file depends on the type of installation:

      Installation Type Location

      Package installations + Installer-Services installations

      /etc/dse/cassandra/logback.xml

      Tarball installations + Installer-No Services installations

      <installation_location>/resources/cassandra/conf/logback.xml

  2. Optional: To change the Tomcat server log locations for DSE Search, edit one of these files:

    • Set TOMCAT_LOGS in the cassandra-env.sh file:

      export TOMCAT_LOGS="/your/log/location"
      Where is the cassandra-env.sh file?

      The location of the cassandra-env.sh file depends on the type of installation:

      Installation Type Location

      Package installations + Installer-Services installations

      /etc/dse/cassandra/cassandra-env.sh

      Tarball installations + Installer-No Services installations

      <installation_location>/resources/cassandra/conf/cassandra-env.sh

    • Set the locations in resources/tomcat/conf/logging.properties.

  1. After you change logging locations, restart DataStax Enterprise.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com