Log File Management and Archiving

The Resolution Service uses a rolling file appender to manage and archive log files efficiently. This ensures that log files do not grow indefinitely and that older logs are archived systematically.

Log Archiving Configuration

The logback.xml configuration file defines how the log files are rotated, archived, and deleted over time. The following outlines the main log file handling:

Main Log File: resolutionservice.log

1. Log File Location

The main logs are written to: logs/resolutionservice.log

2. Rolling Policy

The log file rolls over based on both time and file size, ensuring that the logs are archived regularly.

  • Daily Rolling – A new log file is created each day, helping to keep logs organized by date.

  • File Size Limit – If a log file exceeds 10MB within a day, it rolls over to a new file. This prevents any single log from growing too large.

3. Archived File Pattern

Archived log files are saved in the logs/archived/ directory using the following naming convention:

resolutionservice.yyyy-MM-dd.i.log

Where:

  • yyyy-MM-dd is the date when the log file was created.

  • i is a counter used when multiple files are created on the same day due to file size limits.

4. Maximum History

  • Up to 60 days of logs are retained.

  • Any log files older than 60 days are automatically deleted.

5. Total Size Cap

  • The total size of all archived log files is capped at 20 GB.

  • If the cap is exceeded, the oldest files are deleted to make room for new ones.

Warning Log File (warning-resolutionservice.log)

1. Log File Location

Warnings are logged to:

logs/warning-resolutionservice.log

2. Rolling Policy

Similar to the main log file, the warning log file rolls over based on time and size:

  • Daily Rolling – A new warning log file is created each day.

  • File Size Limit – A new log file is created if the current warning log exceeds 10MB.

3. Archived File Pattern

Archived warning log files are stored in the logs/archived/ directory with the pattern:

warning-resolutionservice.yyyy-MM-dd.i.log

4. Maximum History and Size Cap

  • Maximum History: Up to 60 days of warning logs are retained.

  • Total Size Cap: The total size of archived warning logs is capped at 20GB.

Summary of Log Locations

  • Current Logs:

  • logs/resolutionservice.log

  • logs/warning-resolutionservice.log

  • Archived Logs:

  • logs/archived/

    • resolutionservice.yyyy-MM-dd.i.log

    • warning-resolutionservice.yyyy-MM-dd.i.log

This log management strategy helps keep the logs organized, manageable, and prevents excessive disk usage by automatically archiving and cleaning up old log files.