Log rotation

The log files are usually rotated to avoid oversizing a single log file.

Default Rotation Policy

The current policy used by OpenResty Edge is to rotate log files based on time. The time interval is 3600 seconds, and the maximum number of files retained is 128. This means that Edge will generate 1 log file every 1 hour (3600 seconds).

Log file naming format:

# error.log_yyyymmdd.HHMMSS
error.log_20220922.090000

Modify the rotation policy

The number of log files to keep can then be configured on the Admin’s Web UI as follows:

[Global Config] - [General] - [Log]

The rotation interval can be configured via the config.ini file:

/usr/local/oredge-node/conf/config.ini

[rotate_log]
interval = 3600

If you want to get the path to the log files, you can refer to this document: Path to the log file.