service timestamps
To modify the time-stamp format for system logging (syslog) and debug messages, use the
service timestamps
command in global configuration mode. To revert to the default timestamp format, use the
no
form of this
command.
service timestamps
[[
debug| log
] {
datetime [localtime] [msec] [show-timezone] | disable| uptime
}]
no service timestamps
[[
debug| log
] {
datetime [localtime] [msec] [show-timezone] | disable| uptime
}]
Syntax Description
(Optional) Specifies the time-stamp format for debugging messages.
debug
(Optional) Specifies the time-stamp format for syslog messages.
log
(Optional) Specifies that syslog messages are time-stamped with date and time.
datetime
(Optional) When used with the
datetime
keyword, includes the local time zone
in time stamps.
localtime
(Optional) When used with the
datetime
keyword, includes milliseconds in the
time stamp.
msec
(Optional) When used with the
datetime
keyword, includes time zone information
in the time stamp.
show-timezone
(Optional) Causes messages to be time-stamped in the default format.
disable
(Optional) Specifies that syslog messages are time-stamped with the time that has
elapsed since the networking device last rebooted.
uptime
Command Default
Messages are time-stamped in the month day hh:mm:ss by default.
The default for the
service timestamps debug datetime
and
service timestamps log datetime
forms of the
command with no additional keywords is to format the time in Coordinated Universal Time (UTC) without
milliseconds and time zone information.
Command Modes
Global configuration
Command History
Modification
Release
This command was introduced.
Release 3.2
Cisco IOS XR System Monitoring Command Reference for the Cisco XR 12000 Series Router, Release 4.1
OL-24735-01
341
Logging Services Commands
service timestamps