57
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 "Default output
rules for logs."
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:
1. Enter system view.
N/A
2.
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-
overwrite-protection
[
all-port-powerdown
]
overwrite-protection is disabled.
This command is supported only
in FIPS mode.
5. (Optional.)
maximum size for the log file.
info-center logfile size-quota
size
By default, the maximum size of
the log file is 10 MB.
To ensure normal operation, set
the size
between 1 MB and 10 MB.
6. (Optional.) Specify the
directory to save the log file.
info-center logfile directory
dir-name
The default directory is
flash:/logfile.
The configuration made by this
command cannot survive an IRF
reboot or a master/subordinate
switchover.