Configure the Timestamp for Logs
Configuration Condition
None
Configure the Timestamp for Logs
The timestamp of a log records in details the time at which the log is generated. By default, log timestamps adopt the absolute time format, but they also support Uptime (relative time) format. The absolute time format records the year and the time with millisecond precision. It outputs the time of logs in details.
Table 9–9 Configuring the Timestamp for Logs
Step
|
Command
|
Description
|
Enter the global configuration mode.
|
configure terminal
|
-
|
Configure the timestamp type of the log information
|
logging timestamps uptime
|
Optional
By default, the log information adopt the absolute stamp type.
|
Configure the timestamp format for logs.
|
logging timestamp-format { msec | timezone | year }
|
Optional
By default, the log information adopts the timestamp format with the year to display.
|
-
The uptime refers to the run time starting with device startup.
- The datetime refers to the time of the real-time clock.
- The localtime refers to local time.