Configuration Guide Configuring Syslog
USB ports and USB flash drives are inserted into the USB ports.
filename: Indicates the log file name, which does not contain a file name extension. The file name extension
is always txt.
max-file-size: Indicates the maximum size of a log file. The value ranges from 128 KB to 6 MB. The default
value is 128 KB.
level: Indicates the level of logs that can be written into a log file.
Global configuration mode
 Configuring the Interval at Which Logs Are Written into Log Files
logging flash interval seconds
seconds: Indicates the interval at which logs are written into log files. The value ranges from 1s to 51,840s.
Global configuration mode
This command is used to configure the interval at which logs are written into log files. The countdown starts
after the command is configured.
 Configuring the Storage Time of Log Files
logging life-time level level days
level: Indicates the log level.
days: Indicates the storage time of log files. The unit is day. The storage time is not less than seven days.
Global configuration mode
After the log storage time is configured, the system writes logs of the same level that are generated in the
same day into the same log file. The log file is named yyyy-mm-dd_filename_level.txt, where
yyyy-mm-dd is the absolute time of the day when the logs are generated, filename is the log file named
configured by the logging file flash command, and level is the log level.
After you specify the storage time for logs of a certain level, the system deletes the logs after the storage
time expires. Currently, the storage time ranges from 7days to 365 days.
If the log storage time is not configured, logs are stored based on the file size to ensure compatibility with old
configuration commands.
 Immediately Writing Logs in the Buffer into Log Files
Global configuration mode
After this command is configured, syslogs are stored in the buffer and then written into log files periodically
or when the buffer is full. You can run this command to immediately write logs into log files.