Supported Platforms
Related Documentation
- M, PTX, T Series
- Single-Chassis System Logging Configuration Overview
- M, MX, PTX, T Series
- Examples: Configuring System Logging
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:
However, the timestamp for traceoption messages is specified in milliseconds by default, and is independent of the [edit system syslog time-format] statement.
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 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 contents of a structured-data message, see the Junos OS System Log Messages Reference. |
Related Documentation
- M, PTX, T Series
- Single-Chassis System Logging Configuration Overview
- M, MX, PTX, T Series
- Examples: Configuring System Logging
Published: 2013-01-23
Supported Platforms
Related Documentation
- M, PTX, T Series
- Single-Chassis System Logging Configuration Overview
- M, MX, PTX, T Series
- Examples: Configuring System Logging