logging files rotation

Prev Next

Specifies how often the log files are “rotated” (archived), the type of log file to be rotated, and the maximum number of log files to be retained.

Syntax

logging files rotation criteria frequency { daily | weekly | monthly }

logging files rotation criteria size <megabytes>

logging files rotation criteria size-pct <percent>

[no] logging files rotation file-type { audit | login-history } criteria enable

logging files rotation file-type { audit | login-history } criteria frequency { daily | monthly | weekly | yearly }

logging files rotation file-type { audit | login-history } criteria size <megabytes

logging files rotation file-type { audit | login-history } criteria size-pct <percent>

logging files rotation file-type { audit | login-history } max-num <number>

logging files rotation force

logging files rotation max-num <number>

Parameters

criteria frequency daily | weekly | monthly

Starts a new log each day, week, or month (not compatible with the criteria size or size-pct options).

criteria size megabytes

Starts a new log when the file exceeds the specified number of megabytes. The file size is checked each hour.

criteria size-pct percent

Starts a new log when the file exceeds the specified percentage of the /var partition size. The file size is checked each hour.

file-type { audit | login-history } criteria enable

Enables rotation criteria for the specified file type.

file-type { audit | login-history } criteria frequency { daily | monthly | weekly | yearly }

Starts a new log each day, week, month, or year for the specified file type.

file-type { audit | login-history } criteria size <megabytes>

Starts a new log when the specified file type exceeds the specified number of megabytes. The file size is checked each hour.

file-type { audit | login-history } criteria size-pct <percentage>

Starts a new log when the specified file type exceeds the specified percentage of the /var partition size. The file size is checked each hour.

force

Forces the start of a new log file (available from Enable mode).

max-num number

Maximum number of old log files to be retained. Each time a new log file is started (or when this value is changed), the oldest log files are deleted to maintain the maximum number of log files.

Examples

The following example starts a new log file when the active log exceeds 10 megabytes, and retains five old log files.

hostname (config) # logging files rotation criteria size 10
hostname (config) # logging files rotation max-num 5

The following example starts a new audit log file every week:

hostname (config) # logging files rotation file-type audit criteria frequency weekly

User role

Admin

Command mode

Config

Supported appliances

This command is supported on the following appliances running the specified releases or later:

  • Malware Analysis: Before release 6.4.

  • Central Management System: Before release 6.4

  • Email Security — Server: Before release 6.4

  • File Protect: Before release 6.4.

  • Network Security: Before release 6.4. The file-type parameter was introduced in release 9.1.0.

  • Intelligent Virtual Execution - Server: Before release 6.4