Configuring System Logs
System Logs Configurations
User Guide
827
2.2 Using the CLI
2.2.1 Configuring the Local Logs
Follow these steps to configure the local logs:
Step 1
configure
Enter global configuration mode.
Step 2
logging buffer
Configure the switch to save system messages in log buffer. Log buffer indicates the RAM for
saving system logs. Information in the log buffer 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. A lower value indicates a higher severity.
Only log messages with a severity level value that is the same or lower than this will 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
Configure the switch to save system messages in log file. Log file indicates the flash sector for
saving system logs. Information in the log file 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 logs 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. A lower value indicates a higher severity. Only
log messages with a severity level value that is the same or lower than this will be saved to the
flash. The default level is 3, indicating that the log messages 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 logs.
Step 8
end
Return to privileged EXEC mode.
Step 9
copy running-config startup-config
Save the settings in the configuration file.
Downloaded from