F3726, F3211, F3174, R5135, R3816-HP Firewalls and UTM Devices System Management and Maintenance Configuration Guide-6PW100

72
This feature enables the device to save generated log information to a log file. You can specify how often
the log file is saved, or you can manually save the log file.
Logs are saved into the log file buffer. The system writes the logs from the log file buffer to the log file at
the specified interval (24 hours by default). You can also manually save the logs while the device is not
busy. After saving logs from the log file buffer to the log file, the system clears the log file buffer.
On devices that support a single log file, the log file has a specific capacity. When the capacity is
reached, the system deletes the earliest messages and writes new messages into the log file. The directory
of the log file varies with the device models. Typically, the log file is saved in the directory
/logfile/logfile.log.
To save system information to a log file:
Ste
p
Command
Remarks
1. Enter system view.
system-view N/A
2. Enable the information center. info-center enable
Optional.
Enabled by default.
3. Enable the log file feature.
info-center logfile enable
Optional.
Enabled by default.
4. Configure the interval at
which the system saves logs in
the logfile buffer to the log file.
info-center logfile frequency
freq-sec
Optional.
The default saving interval is
86400 seconds.
5. Enable the log file
overwrite-protection function
info-center logfile
overwrite-protection
Optional
By default, new logs can be written
from beginning of the log file while
the storage space is not enough.
6. Configure the maximum size
of the log file.
info-center logfile size-quota size
Optional.
The default setting is 10 MB.
To ensure normal operation of the
device, set the size argument to a
value between 1 MB and 10 MB.
7. Configure the directory to
save the log file.
info-center logfile switch-directory
dir-name
Optional.
By default, the log file is saved in
the logfile directory under the root
directory of the storage device (the
root directory of a storage device
varies with devices).
The configuration made by this
command cannot survive a reboot.
8. Manually save the log file
buffer content to the log file.
logfile save
Optional.
Available in any view.
By default, the system saves logs in
the log file buffer to the log file at
the interval configured by the
info-center logfile frequency
command.