6.4. Managing VoltDB Log Files

Documentation

VoltDB Home » Documentation » Administrator's Guide

6.4. Managing VoltDB Log Files

VoltDB uses a rolling log appender that "rolls" the files, periodically saving the old log files and creating a new file for subsequent messages. By default, the log files are rolled daily.

VoltDB also automatically "prunes" older log files to help conserve disk space on the server. The appender specifies the maximum number of files to keep, keeping 30 by default.

You can customize your log configuration to specify a different rolling period and/or a different number of files to keep. For example, the following Log4J configuration rolls the log files twice a day and keeps 14 files, or a week's worth of logs:

<!-- file appender captures all loggers messages. -->
<appender name="file" class="org.apache.log4j.DailyMaxRollingFileAppender">
  <param name="file" value="log/volt.log"/>
  <param name="MaxBackupIndex" value="14"/>
  <param name="DatePattern" value="'.'yyyy-MM-dd-a" />
  <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d   %-5p [%t] %c: %m%n"/>
  </layout>
</appender>