Skip to content

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

nodetool getlogginglevels

Displays the current logging levels for all loggers.


Terminal window
nodetool [connection_options] getlogginglevels

See connection options for connection options.

nodetool getlogginglevels shows all loggers that have been explicitly configured with non-default logging levels. This includes both levels set at runtime via setlogginglevel and levels configured in logback.xml.


Logger Name Log Level
ROOT INFO
org.apache.cassandra.db.compaction DEBUG
org.apache.cassandra.gms DEBUG

Terminal window
nodetool getlogginglevels
Terminal window
nodetool getlogginglevels | grep compaction
Terminal window
nodetool getlogginglevels | grep DEBUG

After enabling debug logging:

Terminal window
# Enable debug
nodetool setlogginglevel org.apache.cassandra.repair DEBUG
# Verify it's set
nodetool getlogginglevels | grep repair
Terminal window
# See all non-default loggers
nodetool getlogginglevels
Terminal window
# Document current debug settings (they don't persist)
nodetool getlogginglevels > /tmp/logging_levels_backup.txt

ROOT INFO

The root logger affects all classes not explicitly configured.

org.apache.cassandra.db DEBUG

All classes under this package inherit this level.

org.apache.cassandra.db.compaction.CompactionManager TRACE

Specific class with its own level.


PackagePurpose
org.apache.cassandra.dbDatabase operations
org.apache.cassandra.db.compactionCompaction
org.apache.cassandra.gmsGossip
org.apache.cassandra.netNetworking
org.apache.cassandra.repairRepair
org.apache.cassandra.streamingStreaming
org.apache.cassandra.hintsHinted handoff
org.apache.cassandra.authAuthentication
org.apache.cassandra.transportCQL protocol

Terminal window
# 1. Check current state
nodetool getlogginglevels
# 2. Enable needed debug levels
nodetool setlogginglevel org.apache.cassandra.repair DEBUG
nodetool setlogginglevel org.apache.cassandra.streaming DEBUG
# 3. Verify enabled
nodetool getlogginglevels
# 4. Debug the issue...
# 5. Reset all debug levels
nodetool setlogginglevel org.apache.cassandra.repair INFO
nodetool setlogginglevel org.apache.cassandra.streaming INFO
# 6. Confirm reset
nodetool getlogginglevels

#!/bin/bash
# check_debug_logging.sh - Alert if debug logging is enabled
DEBUG_COUNT=$(nodetool getlogginglevels | grep -c "DEBUG\|TRACE")
if [ "$DEBUG_COUNT" -gt 0 ]; then
echo "WARNING: $DEBUG_COUNT logger(s) at DEBUG/TRACE level"
nodetool getlogginglevels | grep "DEBUG\|TRACE"
else
echo "OK: No debug logging enabled"
fi
#!/bin/bash
# reset_logging.sh - Reset all loggers to INFO
for logger in $(nodetool getlogginglevels | grep -v "^Logger\|^ROOT" | awk '{print $1}'); do
echo "Resetting $logger to INFO"
nodetool setlogginglevel "$logger" INFO
done

Runtime Configuration

Levels shown by getlogginglevels include:

  • Runtime changes via setlogginglevel (not persisted)
  • Static configuration from logback.xml (persisted)

After restart, only logback.xml settings remain.


CommandRelationship
setlogginglevelChange logging levels
infoGeneral node information