Log Rotation: ODL

Logs for products that use ODL are rotated automatically, depending on settings in the products' logging configuration files. For example, a log is rotated when its file size reaches the limit specified in the maxFileSize property. ODL rotates a log by archiving the main log file and creating a new main log file. For example, FoundationServices0.log is a main log file for Oracle Hyperion Foundation Services. When FoundationServices0.log reaches the specified maximum file size, it is archived as FoundationServicesn.log, where n is the next number in the archive numbering sequence. For more information about ODL log file property settings that affect rotation and log file retention, see Table 3-9.

To change log4j log rotation settings:

  1. Open the appenders.xml file for services or servlets. Locations of appenders.xml files vary by product.
  2. Locate the CompositeRollingAppender definition and modify the properties.

    See Table 3-10.

Some products may require additional steps.

Table 3-10 CompositeRollingAppender Properties

Property Settings
RollingStyle
  • 1–Roll the logs by size

  • 2–Roll the logs by time

  • 3–Roll the logs by size and time

Caution:

RollingStyle 3 could provide confusing results, because naming conventions for logs rolled by time and size differ, and deletion counters do not count logs rolled differently together.

DatePattern value

The time interval for writing log messages to another log file if RollingStyle is set to 2 or 3

For DatePattern using the stringyyyy-MM-dd-mm; for example, yyyy-MM-ddmm means every 60 minutes, yyyy-MM-dd-a means every 12 hours, and yyyy-mm-dd means every 24 hours. The default is every 12 hours.

MaxFileSize

The file size (iu KB, MB, or GB) that triggers the creation of a new log file if RollingStyle is set to 1 or 3

Default: 5MB

MaxSizeRollBackups

The maximum number of log files per originator type (plus one for the current file) that can exist before the system deletes the oldest file, if RollingStyle is set to 1 or 3

Default: 5