26 Log File Management

Built in log archiving capabilities are included in Simphony version 2.8 and later. Rather than deleting the oldest log file when a log reaches its maximum size, Simphony compresses the oldest log file up to 2 percent of its original size and then stores it in an AutoArchive folder, which is located in the same directory as the original logs. This reduces the disk space consumed by the log files and allows you to keep the files for a longer period of time. For example, if the maximum file size for a single log file is 1 MB and the total amount of disk space (log size) that can be used by all log files is 10 MB or 10 logs, when the application generates the 11th log, it compresses the oldest log file and moves it to the AutoArchive folder.

Simphony names the archived files after their log files and includes the date and time of compression. You can easily search the log files for a particular date. For example, if the log file is Log_PEPPER_172.txt, the archived file is Log_Pepper_172.DateOfCreation_TimeOfCreation.zip.

Simphony purges archived log files only when one of the following configured thresholds is met:

Table 26-1 Log Archive Purge Thresholds

Purge Threshold Description

LogArchiver.MinDiskUsedPercent

This threshold defines the free disk space threshold. When the free disk space falls below the configured percentage, the application purges the archived files.

The minimum disk space is set to 10% by default.

LogArchiver.MaxDiskUsedMB

This threshold defines the maximum size for the archived files. When the total size of all the archives exceeds the configured amount, the application purges the archived files.

The size is set to 100 MB by default.

LogArchiver.DaysToKeeep

This threshold defines the number of days to keep the archived logs before purging.

The number of days to keep is set to 21 days by default.

The ArchiveHistory.txt file, which resides in the original log directory, tracks archiving operations. When this file reaches 20 KB, Simphony renames it to ArchiveHistory.previous.txt. Simphony retains only one ArchiveHistory.previous.txt file at a time.

Log archiving is active by default for application servers and services, while it is deactivated by default for workstation services due to the constrained disk space of workstations.