Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Supported Platforms

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:

Aug 21 15:36:30

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 (2010):

Aug 21 15:36:30.401 2010

Note: By default, messages logged in structured-data format include the year and millisecond. 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 interpreting messages in a structured-data format, see Interpreting Messages Generated in Structured-Data Format.

Published: 2014-07-23

Supported Platforms

Published: 2014-07-23