Configuring Maintenance
System Log Configurations
Configuration Guide
681
Step 2
logging buffer
The switch stores the system log messages to the RAM. And the information will be lost when
the switch is restarted. You can view the logs with
show logging buffer
command.
Step 3
logging buffer level
level
Specify the severity level of the log information that should be saved to the buffer.
level
:
Enter the severity level ranging from 0 to 7. The smaller value has the higher priority.
Only the log with the same or smaller severity level value can be saved. The default level is 6,
indicating that the log information of levels 0 to 6 will be saved in the log buffer.
Step 4
logging file flash
Store the log messages in the flash sector of the switch. The information in the flash will not be
lost after the switch is restarted. You can view the logs with
show logging flash
command.
Step 5
logging file flash frequency
{
periodic
periodic
|
immediate
}
Specify the frequency to synchronize the system log file in the log buffer to the flash.
periodic
: Specify the frequency ranging from 1 to 48 hours. By default, the synchronization
process takes place every 24 hours.
immediate
: The system log file in the buffer will be synchronized to the flash immediately. This
option means frequent operations on the flash and is not recommended.
Step 6
logging file flash level
level
Specify the severity level of the log information that should be saved to the flash.
level
: Enter the severity level ranging from 0 to 7. The smaller value has the higher priority. Only
the log with the same or smaller severity level value can be saved to the flash. The default level
is 3, indicating that the log message of levels 0 to 3 will be saved in the log flash.
Step 7
show logging local-config
View the configuration information of the local log.
Step 8
end
Return to privileged EXEC mode.
Step 9
copy running-config startup-config
Save the settings in the configuration file.
The following example shows how to configure the local log on the switch. Save logs of
levels 0 to 5 to the log buffer, and synchronize logs of levels 0 to 2 to the flash every 10
hours:
Switch#configure
Switch(config)#logging buffer
Switch(config)#logging buffer level
5
Switch(config)#logging file flash
Switch(config)#logging file flash frequency periodic
10