
73
Step Command Remarks
receive logs.
The device supports a maximum of 20
log hosts.
Outputting logs to the log buffer
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enable the information
center.
info-center enable
By default, the information center
is enabled.
3.
Enable log output to the log
buffer.
info-center logbuffer
By default, log output to the log
buffer is enabled.
4.
(Optional.) Set the maximum
number of logs that can be
stored in the log buffer.
info-center
logbuffer
size
buffersize
By default, the log buffer can store
512 logs.
5.
Configure an output rule for
the log buffer.
info-center source
{
module-name
|
default
}
{
console
|
monitor
|
logbuffer
|
logfile
|
loghost
} {
deny
|
level
severity
}
For information about default
output rules, see "
6.
(Optional.) Configure the
timestamp format.
info-center timestamp
{
boot
|
date
|
none
}
By default, the timestamp format
is
date
.
Saving logs to the log file
Before logs are saved to the log file, they are output to a temporary buffer called the log file buffer. Do
not confuse the log file buffer with log buffer, which is an independent log output destination.
By default, the log file feature saves logs from the log file buffer to the log file every 24 hours. You can
adjust the saving interval or manually save logs to the log file. After saving logs to the log file, the
system clears the log file buffer.
The log file has a maximum capacity. When the maximum capacity is reached, the system will
replace earliest logs with new logs.
To save logs to the log file:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Enable the information
center.
info-center enable
By default, the information center
is enabled.
3.
Enable the log file feature.
info-center logfile enable
By default, the log file feature is
enabled.
4.
(Optional.) Enable log file
overwrite-protection.
info-center logfile
overwrite-protection
[
all-port-powerdown
]
By default, log file
overwrite-protection is disabled.
This command is supported only
in FIPS mode.
5.
(Optional.) Configure the
maximum size for the log file.
info-center logfile size-quota
size
By default, the maximum size of
the log file is 10 MB.