Configuration Guide Configuring Syslog
Notes
Sylsogs are not immediately written into log files. They are first buffered in the memory buffer, and then written into log
files either periodically (at the interval of one hour by default) or when the buffer is full.
Configuration Steps
Writing Logs into Log Files
(Mandatory) By default, syslogs are not written to any log file.
Unless otherwise specified, perform this configuration on every device.
Configuring the Number of Log Files
(Optional) By default, syslogs are written to 16 log files.
Unless otherwise specified, perform this configuration on the device to configure the number of files which logs are
written into.
Configuring the Interval at Which Logs Are Written into Log Files
(Optional) By default, syslogs are written to log files every hour.
Unless otherwise specified, perform this configuration on the device to configure the interval at which logs are written
into log files.
Configuring the Storage Time of Log Files
(Optional) By default, no storage time is configured.
Unless otherwise specified, perform this configuration on the device to configure the storage time of log files.
Immediately Writing Logs in the Buffer into Log Files
(Optional) By default, syslogs are stored in the buffer and then written into log files periodically or when the buffer is full.
Unless otherwise specified, perform this configuration to write logs in the buffer into log files immediately. This
command takes effect only once after it is configured.
Verification
Run the show logging config command to display the configurations related to the log server.
Related Commands
Writing Logs into Log Files
logging file { flash:filename | usb0:filename | usb1:filename } [ max-file-size ] [ level ]
flash: Indicates that log files will be stored on the extended Flash.
usb0: Indicates that log files will be stored on USB 0. This option is supported only when the device has one
USB port and a USB flash drive is inserted into the USB port.
usb1: Indicates that log files will be stored on USB 1. This option is supported only when the device has two