Overview of Single-Chassis System Logging Configuration
The Junos OS system logging utility on the QFX
Series is similar to the UNIX syslogd utility. This topic
describes how to configure system logging for a single-chassis system
that runs the Junos OS.
Each system log message belongs to a facility, which groups together related messages. Each message is also preassigned
a severity level, which indicates how seriously
the triggering event affects router functions. You always specify
the facility and severity of the messages to include in the log. For
more information, see Specifying the Facility and Severity of Messages to Include in the Log.
You direct messages to one or more destinations
by including the appropriate statement at the [edit system syslog] hierarchy level:
By default, messages are logged in a standard format,
which is based on a UNIX system log format; for detailed information
about message formatting, see the Junos OS System Log Messages Reference. You can alter
the content and format of logged messages in the following ways:
- You can log messages to a file in structured-data format
instead of the standard Junos OS format. Structured-data format provides
more information without adding significant length, and makes it easier
for automated applications to extract information from the message.
For more information, see Logging Messages in Structured-Data Format.
- A message’s facility and severity level
are together referred to as its priority. By
default, the standard Junos OS format for messages does not include
priority information (structured-data format includes a priority code
by default). To include priority information in standard-format messages
directed to a file or a remote destination, include the explicit-priority statement. For more information, see Including Priority Information in System Log Messages.
- By default, the standard Junos OS format for messages
specifies the month, date, hour, minute, and second when the message
was logged. You can modify the timestamp on standard-format system
log messages to include the year, the millisecond, or both. (Structured-data
format specifies the year and millisecond by default.) For more information,
see Including the Year or Millisecond in Timestamps.
- When directing messages to a remote machine,
you can specify the IP address that is reported in messages as their
source. You can also configure features that make it easier to separate
messages generated by Junos OS or messages generated on particular
switches. For more information, see Directing System Log Messages to a Remote Machine.
- The predefined facilities group together
related messages, but you can also use regular expressions to specify
more exactly which messages from a facility are logged to a file,
a user terminal, or a remote destination. For more information, see Using Regular Expressions to Refine the Set of Logged Messages.
 | Note:
During a commit check, warnings about the traceoptions configuration (for example, mismatch in trace file sizes or number
of trace files) are not displayed on the console. However, these warnings
are logged in the system log messages when the new configuration is
committed. |
Published: 2011-09-27