Skip to content

Main content

Syslog Prival Single Field Tool

Parse exactly one RFC 5424 PRI token, with facility and severity numeric fields and no surrounding message.

Loading tool…

Description

Return priority, floor(priority/8) facility, and priority modulo eight severity.

Protocol fields often encode several values in a small token. Checking its supported grammar or extracting a component is narrower than validating a complete message or the behavior of its sender.

Return priority, floor(priority/8) facility, and priority modulo eight severity.

When to use this tool

Use Syslog Prival Single Field when you need to inspect or format the supported protocol field in isolation.

How to use the tool and how it works

  1. Enter priorityToken. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read priority, facility, severity. Use the output convention below.

Require a canonical angle-bracketed integer priority token with no leading zeros except zero and a value 0-191. Return priority, floor(priority/8) facility, and priority modulo eight severity.1

Syslog combines a facility and severity into PRI as facility × 8 + severity, with PRI from 0 through 191. Parsing this field alone does not validate the remaining syslog message.2

Input fieldMeaning and unitsAccepted input
priorityTokenEntire canonical angle-bracket PRI field, with decimal priority from 0 through 191.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
priorityPriorityRequired. Safe integer.
facilityInteger facility from floor(priority / 8).Required. Safe integer.
severityInteger severity from priority modulo 8.Required. Safe integer.
json
{
  "input": {
    "priorityToken": "<165>"
  },
  "output": {
    "priority": 165,
    "facility": 20,
    "severity": 5
  }
}

Limitations and assumptions

  • This parses only PRI, not a complete syslog message, transport, timestamp, sender identity, or actual event severity.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Validate the complete message and its context with the relevant protocol implementation when interoperability matters.

References

  1. Calculation and input contract: parse/syslog-prival-single-field — tool.io

  2. The Syslog Protocol, RFC 5424: PRI — RFC Editor / IETF

Similar or alternative tools