Wednesday, September 1, 2021

Understanding Cassandra system.log file log entries

 

LEVEL

THREAD TYPE AND ID

DATE & TIME

SOURCE FILE

LINE NUMBER

INFO

[CompactionExecutor:155]

2016-02-13 02:18:40,986

CompactionTask.java

:287

WARN

[GossipTasks:1]

2015-03-17 19:47:37,331

Gossiper.java

:648

ERROR

[AntiEntropySessions:1]

2015-02-17 20:32:11,959

CassandraDaemon.java

:199

DEBUG

[OptionalTasks:1]

2015-12-20 11:29:14,056

ColumnFamilyStore.java

:298


  1. Logging level

The logging level indicates the severity of the message. The levels in decreasing order of severity and ascending order of verbosity, are FATAL, ERROR, WARN, INFO, DEBUG and TRACE.

  1. Thread Type and ID

The thread type provides a good indicator about what kind of internal process is logging the message (e.g. compaction, gossip, repair etc.) These names will oftentimes correspond to a thread pool name in the output of nodetool tpstats.

  1. Date and Time

Date and time is especially important for correlating events between different nodes, or between the node and a client. For example, if you see a message on one node indicating that another node has gone down momentarily, you might want to look for a garbage collection massage in the other node’s log around the same time to see if the node went down because of a stop the world GC pause. The timestamp can also be used to calculate of an event by subtracting the timestamp on the end message from the timestamp on the begin message.

  1. Source file and line number

This tells you the source file and line number that logged a message. It can be helpful to look at the Cassandra code and see the context surrounding the code if you don’t understand a message. Keep in mind that line numbers can change between versions when code is added or removed from a class, so if you go code diving, make sure you are looking at code for same version.


Example for changing logging levels:

nodetool setlogginglevel org.apache.cassanra TRACE

nodetool setlogginglevel org.apache.cassandra.gma TRACE

To set to defaults, nodetool setlogginglevel

***

No comments:

Post a Comment