Splice Machine Logging

This topic describes the logging facility used in Splice Machine. Splice Machine also allows you to exercise direct control over logging in your database. You can:

  • Manually disable logging of all SQL statements.
  • Configure individual logger objects to log specific message levels.
  • Call the log function for a specific logger object, passing it a logging level value and a message. If the logger is currently configured to record messages at the specified level, the message is added to the log; otherwise, the logger ignores the message. Logger levels are ordered hierarchically; any message with a level equal to or greater than the hierarchical level for which logging is enabled is recorded into the log.

Splice Machine uses the open source Apache log4j Logging API, which allows you to associate a logger object with any java class, among other features. Loggers can be set to capture different levels of information.

Splice Machine enables statement logging by default.

Logging too much information can slow your system down, but not logging enough information makes it difficult to debug certain issues. The Splice Machine Loggers section below summarizes the loggers used by Splice Machine and the system components that they use. You can use the SQL logging functions described in the SQL Logger Functions section below to retrieve or modify the logging level of any logger used in Splice Machine.

Manually Disabling Logging

Logging of SQL statements is automatically enabled in Splice Machine; to disable logging of statements, you can do so in either of these ways:

  • You can pass an argument to your Splice Machine JVM startup script, as follows:

  • You can add the following property definition to your hbase-default.xml, hbase-site.xml, or splice-site.xml file:

    <description>Property to enable logging of all statements.</description>

You can examine the logged data in your region server’s logs; if you want to change the location where events are logged, see the instructions in the Installation Guide for your platform (Cloudera, Hortonworks, or MapR).

Logger Levels

The log4j API defines six logger levels. The following table displays them from the lowest level to the highest:

Logger Level What gets logged for a logger object set to this level
TRACE Captures all messages.
DEBUG Captures any message whose level is DEBUG, INFO, WARN, ERROR, or FATAL.
INFO Captures any message whose level is INFO, WARN, ERROR, or FATAL.
WARN Captures any message whose level is WARN, ERROR, or FATAL.
ERROR Captures any message whose level is ERROR or FATAL.
FATAL Captures only messages whose level is FATAL.

Splice Machine Loggers

To see a full list of loggers, use the SYSCS_UTIL.SYSCS_GET_LOGGERS system procedure:


The following table summarizes the loggers used in the Splice Machine environment that might interest you if you’re trying to debug performance issues in your database:

Logger Name Default Level Description
org.apache ERROR Logs all Apache software messages
com.splicemachine.db WARN Logs all Derby software messages
com.splicemachine.db.shared.common.sanity ERROR Logs all Derby Sanity Manager messages
com.splicemachine.derby.impl.sql.catalog WARN Logs Derby SQL catalog/dictionary messages
com.splicemachine.db.impl.sql.execute.operations WARN Logs Derby SQL operation messages
org.apache.zookeeper.server.ZooKeeperServer INFO Used to determine when Zookeeper is started
org.apache.zookeeper.server.persistence.FileTxnSnapLog INFO Logs Zookeeper transactions
com.splicemachine WARN By default, controls all Splice Machine logging
com.splicemachine.derby.hbase.SpliceDriver INFO Prints start-up and shutdown messages to the log and to the console
com.splicemachine.derby.management.StatementManager ERROR Set the level of this logger to TRACE to record execution time for SQL statements

SQL Logger Functions

Splice Machine SQL includes the following built-in system procedures, all documented in our SQL Reference Manual, for interacting with the Splice Machine logs:

System Procedure Description
SYSCS_UTIL.SYSCS_GET_LOGGERS Displays a list of the active loggers.
SYSCS_UTIL.SYSCS_GET_LOGGER_LEVEL Displays the current logging level of the specified logger.
SYSCS_UTIL.SYSCS_SET_LOGGER_LEVEL Sets the current logging level of the specified logger.

See Also