Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Logging Messages in Structured-Data Format

    You can log messages to a file in structured-data format instead of the standard Junos OS format. The 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-21.txt. 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;
    structured-data {

    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 Interpreting Messages Generated in Structured-Data Format.

    The structured format is used for all messages logged to the file that are generated by a Junos OS 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 OS system log format, not to structured-data format.

    Modified: 2016-06-17