Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool setlogginglevel

Changes the logging level for a class or package at runtime.


Terminal window
nodetool [connection_options] setlogginglevel [<class|component>] [<level>]

See connection options for connection options.

nodetool setlogginglevel dynamically changes the logging level for a specific Java class, package, or built-in component without restarting Cassandra. This is useful for debugging issues in production.

Non-Persistent Setting

This setting is applied at runtime only and does not persist across node restarts. After a restart, the logging levels revert to the configuration in logback.xml.

Reset All Loggers

Calling nodetool setlogginglevel with no arguments resets all logging levels to the initial configuration from logback.xml.


ArgumentDescription
classFully qualified class name, package, or built-in component name. If omitted with level, resets all loggers
levelLog level: TRACE, DEBUG, INFO, WARN, ERROR, OFF. If omitted, resets the specified logger

The command supports component shortcuts that map to predefined logger sets:

ComponentDescriptionMapped Loggers
bootstrapBootstrap operationsBootstrap-related loggers
compactionCompaction operationsorg.apache.cassandra.db.compaction
repairRepair operationsorg.apache.cassandra.repair
streamingStreaming operationsorg.apache.cassandra.streaming
cqlCQL query handlingCQL transport loggers
ringRing/token managementRing-related loggers

LevelDescription
TRACEMost verbose; detailed tracing information
DEBUGDebugging information
INFOInformational messages (default)
WARNWarning messages
ERRORError messages only
OFFDisable logging

Terminal window
nodetool setlogginglevel org.apache.cassandra.db.compaction DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.gms DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.repair DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.db.compaction.CompactionManager TRACE
Terminal window
nodetool setlogginglevel org.apache.cassandra.transport.messages OFF
Terminal window
nodetool setlogginglevel org.apache.cassandra.db.compaction INFO

Reset All Loggers to Initial Configuration

Section titled “Reset All Loggers to Initial Configuration”
Terminal window
# No arguments resets all loggers
nodetool setlogginglevel
Terminal window
# Omit level to reset a specific logger
nodetool setlogginglevel org.apache.cassandra.db.compaction
Terminal window
# Enable DEBUG for compaction using component shortcut
nodetool setlogginglevel compaction DEBUG
# Enable DEBUG for repair
nodetool setlogginglevel repair DEBUG
# Enable DEBUG for streaming
nodetool setlogginglevel streaming DEBUG

Terminal window
nodetool setlogginglevel org.apache.cassandra.db.compaction DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.repair DEBUG
nodetool setlogginglevel org.apache.cassandra.streaming DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.gms DEBUG
nodetool setlogginglevel org.apache.cassandra.net DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.db DEBUG
nodetool setlogginglevel org.apache.cassandra.service DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.auth DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.transport DEBUG
Terminal window
nodetool setlogginglevel org.apache.cassandra.hints DEBUG

Terminal window
nodetool getlogginglevels

Shows all loggers with non-default levels.


Terminal window
# 1. Enable debug logging for relevant component
nodetool setlogginglevel org.apache.cassandra.db.compaction DEBUG
# 2. Reproduce the issue
nodetool compact my_keyspace my_table
# 3. Check logs
tail -f /var/log/cassandra/debug.log
# 4. Reset logging level
nodetool setlogginglevel org.apache.cassandra.db.compaction INFO

Debug/trace logs typically go to:

/var/log/cassandra/debug.log

Check logback.xml for exact configuration.


Performance Impact

  • DEBUG and TRACE levels generate significant log volume
  • May impact performance on busy clusters
  • May fill disk quickly
  • Always reset after debugging
  1. Be specific - Target specific classes, not broad packages
  2. Time-limited - Enable only for debugging duration
  3. Monitor disk - Debug logs grow fast
  4. Reset promptly - Return to INFO when done

#!/bin/bash
# debug_compaction.sh - Enable debug, wait, then reset
DURATION=${1:-60} # Default 60 seconds
echo "Enabling compaction debug logging for $DURATION seconds..."
nodetool setlogginglevel org.apache.cassandra.db.compaction DEBUG
sleep $DURATION
echo "Resetting to INFO..."
nodetool setlogginglevel org.apache.cassandra.db.compaction INFO
echo "Done. Check /var/log/cassandra/debug.log"

CommandRelationship
getlogginglevelsView current logging levels
infoNode information
compactionstatsAlternative to debug logs