Enabling and Disabling Time Stamps on Log Messages
By default, log messages are not time-stamped.
This task is optional.
SUMMARY STEPS
1.
configure terminal
2.
Use one of these commands:
•
service timestamps log uptime
•
service timestamps log datetime
[
msec
|
localtime
|
show-timezone
]
3.
end
DETAILED STEPS
Purpose
Command or Action
Enters global configuration mode.
configure terminal
Example:
Step 1
Device#
configure terminal
Enables log time stamps.
Use one of these commands:
Step 2
•
service timestamps log uptime
•
log uptime—
Enables time stamps on log messages,
showing the time since the system was rebooted.
•
service timestamps log datetime
[
msec
|
localtime
|
show-timezone
]
•
log datetime—
Enables time stamps on log messages.
Depending on the options selected, the time stamp can
Example:
include the date, time in milliseconds relative to the
local time zone, and the time zone name.
Device(config)#
service timestamps log uptime
or
Device(config)#
service timestamps log datetime
Returns to privileged EXEC mode.
end
Example:
Step 3
Device(config)#
end
Enabling and Disabling Sequence Numbers in Log Messages
If there is more than one log message with the same time stamp, you can display messages with sequence
numbers to view these messages. By default, sequence numbers in log messages are not displayed.
This task is optional.
System Management Configuration Guide, Cisco IOS XE Gibraltar 16.10.x (Catalyst 9200 Switches)
126
Configuring System Message Logs
Enabling and Disabling Time Stamps on Log Messages