Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Logging Messages in Structured-Data Format

You can log messages to a file in structured-data format instead of the standard Junos format. Structured-data format provides more information without adding significant length, and makes it easier for automated applications to extract information from a message.

The structured-data format complies with Internet draft draft-ietf-syslog-protocol-23, The syslog Protocol, which is at http://tools.ietf.org/html/draft-ietf-syslog-protocol-23. The draft establishes a standard message format regardless of the source or transport protocol for logged messages.

To output messages to a file in structured-data format, include the structured-data statement at the [edit system syslog file filename] hierarchy level:

[edit system syslog file filename]facility severity;

The optional brief statement suppresses the English-language text that appears by default at the end of a message to describe the error or event. For information about the fields in a structured-data format message, see the Junos OS System Log Messages Reference.

The structured format is used for all messages logged to the file that are generated by a Junos process or software library.

Note: If you include either or both of the explicit-priority and time-format statements along with the structured-data statement, they are ignored. These statements apply to the standard Junos system log format, not to structured-data format.

Published: 2013-07-17