[Contents] [Prev] [Next] [Index] [Report an Error]


Including Priority in System Log Messages

A message's facility and severity level are together referred to as its priority. By default, the system logging utility does not include information about priority in system log messages.

To include the priority in 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;

To include the priority 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;

When the explicit-priority statement is included, the message string includes the facility name and a numerical code representing the severity level. The name and number appear directly before the message tag. (The tag is a unique identifier assigned to some JUNOS system log messages; for more information, see Interpreting System Log Messages and Displaying and Interpreting System Log Message Descriptions.)

The message string always reports the original, local facility name. If the message belongs to a facility with a JUNOS-specific name, the JUNOS system logging utility still uses the alternative facility name for the message itself when it directs the message to a remote destination. For more information, see Changing the Alternative Facility Name for Remote Messages.

Table 11 lists the facility codes that can appear in system log messages and maps them to facility names.

NOTE: If Table 11 does not provide the facility name for a code, you cannot include the facility in a statement at the [edit system syslog] hierarchy level. The JUNOS software might use these facilities—and others that are not listed—when reporting on internal operations.


 

Table 11: Mapping of Facility Codes to Names 
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

Configuration that is inconsistent with routing platform hardware

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 various 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 CLI prompt or by a JUNOScript or NETCONF client application

KERN

kernel

Actions performed or errors encountered by the JUNOS kernel

NTP


Actions performed or errors encountered by the Network Time Protocol process (ntpd)

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 various user-space processes


Table 12 lists the numerical severity codes that can appear in system log messages and maps them to severity levels.

Table 12: Mapping of Numerical Codes to Severity Levels 
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):

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, which has the following format:

Aug 21 12:36:30 router1 chassisd[522]: CHASSISD_PARSE_COMPLETE: Using 
new configuration

For more information about message formatting, see Displaying and Interpreting System Log Messages.


[Contents] [Prev] [Next] [Index] [Report an Error]