[GH-ISSUE #842] SyslogUdpHandler priority format bug? #328

Closed
opened 2026-03-04 02:14:10 +03:00 by kerem · 1 comment
Owner

Originally created by @codeb2cc on GitHub (Sep 1, 2016).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/842

    protected function makeCommonSyslogHeader($severity)
    {
        $priority = $severity + $this->facility;
        return "<$priority>1 ";
    }

Why there's a 1 after priority? RFC5424 defines:

HEADER          = PRI VERSION SP TIMESTAMP SP HOSTNAME
                        SP APP-NAME SP PROCID SP MSGID
PRI             = "<" PRIVAL ">"
Originally created by @codeb2cc on GitHub (Sep 1, 2016). Original GitHub issue: https://github.com/Seldaek/monolog/issues/842 ``` protected function makeCommonSyslogHeader($severity) { $priority = $severity + $this->facility; return "<$priority>1 "; } ``` Why there's a `1` after priority? RFC5424 defines: ``` HEADER = PRI VERSION SP TIMESTAMP SP HOSTNAME SP APP-NAME SP PROCID SP MSGID PRI = "<" PRIVAL ">" ```
kerem closed this issue 2026-03-04 02:14:10 +03:00
Author
Owner

@Seldaek commented on GitHub (Sep 25, 2016):

It's the version I believe. As per https://tools.ietf.org/html/rfc5424#section-6.2.2 - and https://tools.ietf.org/html/rfc5424#section-6.5 also shows this <prio>1 scheme in examples, so it seems fine to me.

<!-- gh-comment-id:249428280 --> @Seldaek commented on GitHub (Sep 25, 2016): It's the version I believe. As per https://tools.ietf.org/html/rfc5424#section-6.2.2 - and https://tools.ietf.org/html/rfc5424#section-6.5 also shows this `<prio>1` scheme in examples, so it seems fine to me.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#328
No description provided.