# BSD-syslog or legacy-syslog messages

New to AxoSyslog? AxoSyslog is a binary compatible `syslog-ng` replacement, from the original creator, developed by the same team.

Same architecture, same config files, same paths. Cloud-native images, fast releases, modern observability (OTel, K8s), and powerful data processing: read more about the [differences between AxoSyslog and `syslog-ng`](<https://axoflow.com/axosyslog-vs-syslog-ng?utm_source=docs&utm_medium=banner>).

Also, it’s super easy to [install](../../../docs/axosyslog-core/4.26/install/index.md), and you can [upgrade from `syslog-ng` in minutes](../../../docs/axosyslog-core/4.26/install/upgrade-syslog-ng/index.md).

This section describes the format of a syslog message, according to the [legacy-syslog or BSD-syslog protocol](<https://datatracker.ietf.org/doc/rfc3164/>). A syslog message consists of the following parts (the examples are taken from the sample message below):

Part | Example  
---|---  
[`PRI`](../../../docs/axosyslog-core/4.26/chapter-concepts/concepts-message-structure/concepts-message-pri/index.md) | `<34>`  
[`HEADER`](../../../docs/axosyslog-core/4.26/chapter-concepts/concepts-message-structure/concepts-message-bsdsyslog/index.md#the-header-message-part) | `Oct 11 22:14:15 mymachine`  
[`MSG`](../../../docs/axosyslog-core/4.26/chapter-concepts/concepts-message-structure/concepts-message-bsdsyslog/index.md#the-msg-message-part) | `su: 'su root' failed for lonvick on /dev/pts/8`  
  
The total message cannot be longer than 1024 bytes.

The following is a sample syslog message

Terminal window
```
    <34>Oct 11 22:14:15 mymachine su: 'su root' failed for lonvick on /dev/pts/8
```

The message corresponds to the following format:

Terminal window
```
    <priority>timestamp hostname application: message
```

The different parts of the message are explained in the following sections.

Note RFC 3164 is lenient about what a message must contain: senders may omit the `PRI` (and sometimes the `HEADER`), and receivers still accept such messages. When a message has no `PRI`, AxoSyslog assigns a default facility and severity (`user.notice`, PRI `13`) — see [The PRI message part](../../../docs/axosyslog-core/4.26/chapter-concepts/concepts-message-structure/concepts-message-pri/index.md). 

Note The AxoSyslog application supports longer messages as well. For details, see the `log-msg-size()` option in [Global options reference](../../../docs/axosyslog-core/4.26/chapter-global-options/reference-options/index.md). However, it is not recommended to enable messages larger than the packet size when using UDP destinations. 

## The HEADER message part

The `HEADER` message 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. (for example, _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 AxoSyslog application supports other timestamp formats as well, like ISO, or the PIX extended format. For details, see the [ts-format()](../../../docs/axosyslog-core/4.26/chapter-global-options/reference-options/index.md#global-option-ts-format) global option. 

## The MSG message part

The `MSG` part contains the name of the program or process that generated the message, and the text of the message itself. The `MSG` part is usually in the following format: `program[pid]: message text`.

Last modified July 24, 2026: [Apply review suggestions: anchored relref/xref links (cef3eb2a)](<https://github.com/axoflow/axosyslog-core-docs/commit/cef3eb2aca222936185f262b573441ee9d3210f8>)