Configuration Guide Configuring Syslog
 Enabling the RFC5424 Syslog Format
service log-format rfc5424
Global configuration mode
After the new format (RFC5424 log format) is enabled, the service sequence-numbers, service sysname,
service timestamps, service private-syslog, and service standard-syslog commands that are
applicable only to the old format (RFC3164 log format) loss effect and are hidden.
After the old format (RFC3164 log format) is enabled, the logging delay-send, logging policy, and
logging statistic commands that are applicable only to the RFC5424 log format loss effect and are hidden.
After log format switchover, the outputs of the show logging and show logging config commands change
accordingly.
Configuration Example
 Enabling the RFC3164 Log Format
It is required to configure the timestamp format as follows:
1. Enable the RFC3164 format.
2. Change the timestamp format to datetime and add the millisecond and year to the timestamp.
3. Add the sysname to the log.
4. Add the sequence number to the log.
 Configure the syslog format.
Ruijie# configure terminal
Ruijie(config)# no service log-format rfc5424
Ruijie(config)# service timestamps log datetime year msec
Ruijie(config)# service timestamps debug datetime year msec
Ruijie(config)# service sysname
Ruijie(config)# service sequence-numbers
After the timestamp format is configured, verify that new syslogs are displayed in the RFC3164 format.
 Run the show logging config command to display the configuration.
 Enter or exit global configuration mode to generate a new log, and check the format of the timestamp in
the new log.