This section describes the format of a syslog message, according to the legacy-syslog or BSD-syslog protocol (see RFC 3164 http://www.ietf.org/rfc/rfc3164.txt). A syslog message consists of the following parts:
The total message cannot be longer than 1024 bytes.
The following is a sample syslog message: <133>Feb 25
14:09:07 webserver syslogd: restart. The message corresponds to the
following format: <priority>timestamp hostname application:
message. The different parts of the message are explained in the
following sections.
![]() |
Note |
|---|---|
The syslog-ng application supports longer messages as well. For details, see
the |
The PRI part of the syslog message (known as Priority value) represents the Facility and Severity of the message. Facility represents the part of the system sending the message, while severity marks its importance. The Priority value is calculated by first multiplying the Facility number by 8 and then adding the numerical value of the Severity. The possible facility and severity values are presented below.
![]() |
Note |
|---|---|
Facility codes may slightly vary between different platforms. The syslog-ng application accepts facility codes as numerical values as well. |
| Numerical Code | Facility |
|---|---|
| 0 | kernel messages |
| 1 | user-level messages |
| 2 | mail system |
| 3 | system daemons |
| 4 | security/authorization messages |
| 5 | messages generated internally by syslogd |
| 6 | line printer subsystem |
| 7 | network news subsystem |
| 8 | UUCP subsystem |
| 9 | clock daemon |
| 10 | security/authorization messages |
| 11 | FTP daemon |
| 12 | NTP subsystem |
| 13 | log audit |
| 14 | log alert |
| 15 | clock daemon |
| 16-23 | locally used facilities (local0-local7) |
Table 2.1. syslog Message Facilities
The following table lists the severity values.
| Numerical Code | Severity |
|---|---|
| 0 | Emergency: system is unusable |
| 1 | Alert: action must be taken immediately |
| 2 | Critical: critical conditions |
| 3 | Error: error conditions |
| 4 | Warning: warning conditions |
| 5 | Notice: normal but significant condition |
| 6 | Informational: informational messages |
| 7 | Debug: debug-level messages |
Table 2.2. syslog Message Severities
The HEADER part contains a timestamp and the hostname (without the domain
name) or the IP address of the device. The timestamp field is the local time in
the Mmm dd hh:mm:ss format, where:
Mmm is the English abbreviation of the month: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
dd is the day of the month on two digits. If the
day of the month is less than 10, the first digit is replaced with a
space. (E.g., Aug 7.)
hh:mm:ss is the local time. The hour (hh) is represented in a 24-hour format. Valid entries are between 00 and 23, inclusive. The minute (mm) and second (ss) entries are between 00 and 59 inclusive.
![]() |
Note |
|---|---|
The syslog-ng application supports other timestamp formats as well, like
ISO, or the PIX extended format. For details, see the
|
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com