Configuration Guide Configuring Syslog
Adding the Sequence Number to the Syslog
(Optional) By default, the syslog does not contain the sequence number.
Unless otherwise specified, perform this configuration on the device to add the sequence number to the syslog.
Enabling the Standard Log Format
(Optional) By default, the default log format is used.
Unless otherwise specified, perform this configuration on the device to enable the standard log format.
Enabling the Private Log Format
(Optional) By default, the default log format is used.
Unless otherwise specified, perform this configuration on the device to enable the private log format.
Enabling the RFC5424 Log Format
(Optional) By default, the RFC5424 log format is disabled.
Unless otherwise specified, perform this configuration on the device to enable the RFC5424 log format.
Verification
Generate a syslog, and check the log format.
Related Commands
Configuring the Timestamp Format of Syslogs
service timestamps [ message-type [ uptime | datetime [ msec ] [ year ] ] ]
message-type: Indicates the log type. There are two log types: log and debug.
uptime: Indicates the device startup time in the format of dd:hh:mm:ss, for example, 07:00:10:41.
datetime: Indicates the current device time in the format of MM DD hh:mm:ss, for example, Jul 27 16:53:07.
msec: Indicates that the current device time contains millisecond.
year: Indicates that the current device time contains year.
Global configuration mode
Two syslog timestamp formats are available, namely, uptime and datetime. You can select a timestamp
format as required.
Adding the Sysname to the Syslog
Global configuration mode