GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • V11 Documentation
  • Privacy Statement
  • License Agreement
  • Contact Us

This view

  • Original page
  • New address

GeezerVison is showing docs.voltdb.com — 6.2. Creating the Logging Configuration File

  • Volt Active Data
  • Developer Hub
  • Books
    • VoltDB Tutorial
    • Using VoltDB
    • VoltDB Guide to Performance and Customization
    • VoltDB Administrator's Guide
    • Volt Kubernetes Administrator's Guide
    • VoltDB Quick Reference
  • Current docs ▶
  • VoltDB V11
    • VoltDB V16
    • VoltDB V15.3 LTS
    • VoltDB V14.3 LTS
    • VoltDB V13.3 LTS
    • VoltDB V12.3 LTS
    • VoltDB V11.4
    • VoltDB V10.2
    • VoltDB V9.3
6.2. Creating the Logging Configuration File

Administrator's Guide

  • Preface▶
    • 1. Structure of This Book
    • 2. Related Documents
  • 1. Managing Volt Active Data Databases▶
    • 1.1. Getting Started
    • 1.2. Understanding the VoltDB Utilities
    • 1.3. Management Tasks
  • 2. Preparing the Servers▶
    • 2.1. Server Checklist
    • 2.2. Install Required Software
    • 2.3. Configure Memory Management
      • 2.3.1. Disable Swapping
      • 2.3.2. Disable Transparent Huge Pages
      • 2.3.3. Enable Virtual Memory Mapping and Overcommit
    • 2.4. Turn off TCP Segmentation
    • 2.5. Configure Time Services
    • 2.6. Increase Resource Limits
    • 2.7. Configure the Network
    • 2.8. Assign Network Ports
    • 2.9. Eliminating Server Process Latency
  • 3. Starting and Stopping the Database▶
    • 3.1. Configuring the Cluster and Database
    • 3.2. Initializing the Database Root Directory
    • 3.3. Starting the Database
    • 3.4. Loading the Database Definition
      • 3.4.1. Preloading the Schema and Classes When You Initialize the Database
      • 3.4.2. Loading the Schema and Classes After the Database Starts
    • 3.5. Stopping the Database
    • 3.6. Restarting the Database
    • 3.7. Starting and Stopping Individual Servers
  • 4. Maintenance and Upgrades▶
    • 4.1. Backing Up the Database
    • 4.2. Updating the Database Schema
      • 4.2.1. Performing Live Schema Updates
      • 4.2.2. Performing Updates Using Save and Restore
    • 4.3. Upgrading the Cluster
      • 4.3.1. Performing Server Upgrades
      • 4.3.2. Performing Rolling Hardware Upgrades on K-Safe Clusters
      • 4.3.3. Adding Servers to a Running Cluster with Elastic Scaling
      • 4.3.4. Removing Servers from a Running Cluster with Elastic Scaling
      • 4.3.5. Reconfiguring the Cluster During a Maintenance Window
    • 4.4. Upgrading VoltDB Software
      • 4.4.1. Upgrading VoltDB Using Save and Restore
      • 4.4.2. Upgrading Older Versions of VoltDB Manually
      • 4.4.3. Upgrading VoltDB With Reduced Downtime Using a DR Replica
      • 4.4.4. Performing an Online Upgrade Using Multiple XDCR Clusters
      • 4.4.5. Performing an Online Upgrade With Limited Hardware
      • 4.4.6. Downgrading, or Falling Back to a Previous VoltDB Version
    • 4.5. Updating the VoltDB Software License
  • 5. Monitoring VoltDB Databases▶
    • 5.1. Monitoring Overall Database Activity
      • 5.1.1. Volt Management Center
      • 5.1.2. System Procedures
      • 5.1.3. SNMP Alerts
    • 5.2. Setting the Database to Read-Only Mode When System Resources Run Low
      • 5.2.1. Monitoring Memory Usage
      • 5.2.2. Monitoring Disk Usage
    • 5.3. Integrating VoltDB with Other Monitoring Systems
      • 5.3.1. Integrating with Prometheus
      • 5.3.2. Integrating with Nagios
      • 5.3.3. Integrating with New Relic
  • 6. Logging and Analyzing Activity in a VoltDB Database▶
    • 6.1. Introduction to Logging
    • 6.2. Creating the Logging Configuration File
    • 6.3. Changing the Timezone of Log Messages
    • 6.4. Managing VoltDB Log Files
    • 6.5. Enabling Your Custom Log Configuration When Starting VoltDB
    • 6.6. Changing the Configuration on the Fly
  • 7. What to Do When Problems Arise▶
    • 7.1. Where to Look for Answers
    • 7.2. Handling Errors When Restoring a Database
      • 7.2.1. Logging Constraint Violations
      • 7.2.2. Safe Mode Recovery
    • 7.3. Collecting the Log Files
  • A. Server Configuration Options▶
    • A.1. Server Configuration Options
      • A.1.1. Network Configuration (DNS)
      • A.1.2. Time Configuration
    • A.2. Process Configuration Options
      • A.2.1. Maximum Heap Size (VOLTDB_HEAPMAX)
      • A.2.2. Garbage Collector (VOLTDB_GC_OPTS)
      • A.2.3. Other Java Runtime Options (VOLTDB_OPTS)
    • A.3. Database Configuration Options
      • A.3.1. Sites per Host
      • A.3.2. K-Safety
      • A.3.3. Network Partition Detection
      • A.3.4. Automated Snapshots
      • A.3.5. Import and Export
      • A.3.6. Command Logging
      • A.3.7. Heartbeat
      • A.3.8. Temp Table Size
      • A.3.9. Query Timeout
      • A.3.10. Flush Interval
      • A.3.11. Long-Running Process Warning
      • A.3.12. Copying Array Parameters
      • A.3.13. Transaction Prioritization
      • A.3.14. Clock Skew
    • A.4. Path Configuration Options
      • A.4.1. VoltDB Root
      • A.4.2. Snapshots Path
      • A.4.3. Export Overflow Path
      • A.4.4. Command Log Path
      • A.4.5. Command Log Snapshots Path
    • A.5. Network Ports
      • A.5.1. Client Port
      • A.5.2. Admin Port
      • A.5.3. Web Interface Port (http)
      • A.5.4. Internal Server Port
      • A.5.5. Replication Port
      • A.5.6. Topics Port
      • A.5.7. Zookeeper Port
      • A.5.8. TLS/SSL Encryption (Including HTTPS)
  • B. Snapshot Utilities▶
    • snapshotconvert
    • snapshotverifier

6.2. Creating the Logging Configuration File

VoltDB ships with a default Log4J configuration file, voltdb/log4j.xml, in the installation directory. The sample applications and the VoltDB shell commands use this file to configure logging and it is recommended for new application development. This default Log4J file lists all of the VoltDB-specific logging categories and can be used as a template for any modifications you wish to make. Or you can create a new file from scratch.

The following is an example of a Log4J configuration file:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<appender name="Async" class="org.apache.log4j.AsyncAppender">
  <param name="Blocking" value="true" />
  <appender-ref ref="Console" />
  <appender-ref ref="File" />
</appender>

<appender name="Console" class="org.apache.log4j.ConsoleAppender">
  <param name="Target" value="System.out" />
  <layout class="org.apache.log4j.TTCCLayout" />
</appender>

<appender name="File" class="org.apache.log4j.FileAppender">
  <param name="File" value="/tmp/voltdb.log" />
  <param name="Append" value="true" />
  <layout class="org.apache.log4j.TTCCLayout" />
</appender>

<logger name="AUTH"> 
<!-- Print all VoltDB authentication messages -->
  <level value="trace" />
</logger>

<root>
      <priority value="debug" />
      <appender-ref ref="Async" />
</root>
</log4j:configuration>

The preceding configuration file defines three destinations, or appenders, called Async, Console, and File. The appenders define the type of output (whether to the console, to a file, or somewhere else), the location (such as the file name), as well as the layout of the messages sent to the appender. See the log4J documentation for more information about layout.

Note that the appender Async is a superset of Console and File. So any messages sent to Async are routed to both Console and File. This is important because for logging of VoltDB, you should always use an asynchronous appender as the primary target to avoid the processing of the logging messages from blocking other execution threads.

More importantly, you should not use any appenders that are susceptible to extended delays, blockages, or slow throughput, This is particularly true for network-based appenders such as SocketAppender and third-party log infrastructures including logstash and JMS. If there is any prolonged delay in writing to the appenders, messages can end up being held in memory causing performance degradation and, ultimately, generating out of memory errors or forcing the database into read-only mode.

The configuration file also defines a root class. The root class is the default logger and all loggers inherit the root definition. So, in this case, any messages of severity "debug" or higher are sent to the Async appender.

Note

This example is for demonstration purposes only. Normally, do not set the severity to either "debug" or "trace" for production systems unless instructed to by VoltDB Support. Trace and debug logging generate a significant number of messages that can negatively impact performance. They contain internal information for debugging purposes and provide no additional value otherwise.

Finally, the configuration file defines a logger specifically for VoltDB authentication messages. The logger identifies the class of messages to log (in this case "AUTH"), as well as the severity ("trace"). VoltDB defines several different classes of messages you can log. Table 6.1, “VoltDB Components for Logging” lists the loggers you can invoke.

Table 6.1. VoltDB Components for Logging

LoggerDescription
ADHOCExecution of ad hoc queries
AUTHAuthentication and authorization of clients
COMPILERInterpretation of SQL in ad hoc queries
CONSOLEInformational messages intended for display on the console
DRDatabase replication sending data
DRAGENTDatabase replication receiving data
EXPORTExporting data
GCJava garbage collection
HOSTHost specific events
IMPORTImporting data
ELASTICElastic addition of nodes to the cluster
LOADERBulk loading of data (including as part of import)
NETWORKNetwork events related to the database cluster
REJOINNode recovery and rejoin
SNAPSHOTSnapshot activity
SQLExecution of SQL statements
TMTransaction management
TOPICSStreaming data in topics

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.