Including the Year or Millisecond in Timestamps
By default, the timestamp recorded in a standard-format system log message specifies the month, date, hour, minute, and second when the message was logged, as in the following example:
To include the year, the millisecond, or both in the timestamp, include the time-format statement at the [edit system syslog] hierarchy level:
edit system syslog] time-format (year | millisecond | year millisecond);
The modified timestamp is used in messages directed to each destination configured by a file, console, or user statement at the [edit system syslog] hierarchy level, but not to destinations configured by a host statement.
The following example illustrates the format for a timestamp that includes both the millisecond (401) and the year (2006):
![]() | Note: Messages logged in structured-data format (available in Junos OS Release 8.3 and later for file destinations) include the year and millisecond by default. If you include the structured-data statement at the [edit system syslog file filename] hierarchy level along with the time-format statement, the time-format statement is ignored and messages are logged in structured-data format. For information about the structured-data statement, see Logging Messages in Structured-Data Format. For information about the information in a structured-data message, see Displaying a Log File from a Single-Chassis System. |
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
