A message’s facility and severity level are together referred to as its priority. By default, messages logged in the standard JUNOS format do not include information about priority. To include priority information in standard-format messages directed to a file, include the explicit-priority statement at the [edit system syslog file filename] hierarchy level:
- [edit system syslog file filename]
-
facility severity;
- explicit-priority;
![]() |
Note: Messages logged in structured-data format include priority information by default (structured-data format is available in JUNOS Release 8.3 and later and for file destinations only). If you include the structured-data statement at the [edit system syslog file filename] hierarchy level along with the explicit-priority statement, the explicit-priority 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 System Log Messages Reference. |
To include priority information in messages directed to a remote machine or the other Routing Engine, include the explicit-priority statement at the [edit system syslog host (hostname | other-routing-engine)] hierarchy level:
- [edit system syslog host (hostname | other-routing-engine)]
-
facility severity;
- explicit-priority;
The priority recorded in a message always indicates the original, local facility name. If the facility-override statement is included for messages directed to a remote destination, the JUNOS system logging utility still uses the alternative facility name for the messages themselves when directing them to the remote destination. For more information, see Changing the Alternative Facility Name for Remote Messages.
When the explicit-priority statement is included, the JUNOS logging utility prepends codes for the facility name and severity level to the message tag name, if the message has one:
-
FACILITY-severity[-TAG]
(The tag is a unique identifier assigned to some JUNOS system log messages; for more information, see the JUNOS System Log Messages Reference.)
Table 23 lists the facility codes that can appear in system log messages and maps them to facility names.
![]() |
Note: If the second column in Table 23 does not include the JUNOS facility name for a code, the facility cannot be included in a statement at the [edit system syslog] hierarchy level. The JUNOS software might use the facilitiesin Table 23—and others that are not listed—when reporting on internal operations. |
Table 23: Facility Codes Reported in Priority Information
Table 24 lists the numerical severity codes that can appear in system log messages and maps them to severity levels.
Table 24: Numerical Codes for Severity Levels Reported in Priority Information
In the following example, the CHASSISD_PARSE_COMPLETE message belongs to the daemon facility and is assigned severity info (6):
- Aug 21 12:36:30 router1 chassisd[522]: %DAEMON-6-CHASSISD_PARSE_COMPLETE:
Using new configuration
When the explicit-priority statement is not included, the priority does not appear in the message:
- Aug 21 12:36:30 router1 chassisd[522]: CHASSISD_PARSE_COMPLETE:
Using new configuration
For more information about message formatting, see the JUNOS System Log Messages Reference.