Setting the minimum storage period for logs

Use this feature to set the minimum storage period for logs in the log buffer and log file. This feature ensures that logs will not be overwritten by new logs during a set period of time.

By default, when the log buffer or log file is full, new logs will automatically overwrite the oldest logs. After the minimum storage period is set, the system identifies the storage period of a log to determine whether to delete the log. The system current time minus a log's generation time is the log's storage period.

To set the log minimum storage period:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Set the log minimum storage period.

info-center syslog min-age min-age

By default, the log minimum storage period is not set.