Including Priority Information in System Log Messages
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 OS 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 Displaying a Log File from a Single-Chassis System. |
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 for the messages themselves when directing them to the remote destination. For more information about alternative facilities, 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:
(The tag is a unique identifier assigned to some Junos system log messages; for more information, see Interpreting Messages Generated in Structured-Data Format, Interpreting Messages Generated in Standard Format by Services on a PIC, Interpreting Messages Generated in Standard Format by a JUNOS Process or Library, and Displaying and Interpreting System Log Message Descriptions.)
Table 9 lists the facility codes that can appear in system log messages and maps them to facility names.
![]() | Note: If the second column in Table 9 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 OS might use the facilities in Table 9— and others that are not listed—when reporting on internal operations |
Table 9: Facility Codes Reported in Priority Information
| Code | Junos Facility Name | Type of Event or Error |
|---|---|---|
AUTH | authorization | Authentication and authorization attempts |
AUTHPRIV | Authentication and authorization attempts that can be viewed by superusers only | |
CHANGE | change-log | Changes to the Junos configuration |
CONFLICT | conflict-log | Specified configuration is invalid on the routing platform type |
CONSOLE | Messages written to /dev/console by the kernel console output driver | |
CRON | Actions performed or errors encountered by the cron process | |
DAEMON | daemon | Actions performed or errors encountered by system processes |
DFC | dfc | Actions performed or errors encountered by the dynamic flow capture process |
FIREWALL | firewall | Packet filtering actions performed by a firewall filter |
FTP | ftp | Actions performed or errors encountered by the FTP process |
INTERACT | interactive-commands | Commands issued at the Junos OS CLI prompt or invoked by a client application such as a Junos XML protocol or NETCONF client |
KERN | kernel | Actions performed or errors encountered by the Junos kernel |
NTP | Actions performed or errors encountered by the Network Time Protocol (NTP) process | |
PFE | pfe | Actions performed or errors encountered by the Packet Forwarding Engine |
SYSLOG | Actions performed or errors encountered by the Junos system logging utility | |
USER | user | Actions performed or errors encountered by user-space processes |
Table 10 lists the numerical severity codes that can appear in system log messages and maps them to severity levels.
Table 10: Numerical Codes for Severity Levels Reported in Priority Information
| Numerical Code | Severity Level | Description |
|---|---|---|
0 | emergency | System panic or other condition that causes the routing platform to stop functioning |
1 | alert | Conditions that require immediate correction, such as a corrupted system database |
2 | critical | Critical conditions, such as hard drive errors |
3 | error | Error conditions that generally have less serious consequences than errors in the emergency, alert, and critical levels |
4 | warning | Conditions that warrant monitoring |
5 | notice | Conditions that are not errors but might warrant special handling |
6 | info | Events or nonerror conditions of interest |
7 | debug | Software debugging messages (these appear only if a technical support representative has instructed you to configure this severity level) |
In the following example, the CHASSISD_PARSE_COMPLETE message belongs to the daemon facility and is assigned severity info (6):
When the explicit-priority statement is not included, the priority does not appear in the message:
For more information about message formatting, see Displaying and Interpreting System Log Message Descriptions.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
