Computes the RFC 5424 PRI value from a facility and severity.
PRI = facility * 8 + severity. Both inputs are resolved first, so names and numbers give the same result.
PRI = facility * 8 + severity
The facility input.
The severity input.
The integer priority value.
If either input is invalid.
1.0.0
import { computePri } from 'edgeport/syslog';computePri('local0', 'info'); // 16 * 8 + 6 = 134 Copy
import { computePri } from 'edgeport/syslog';computePri('local0', 'info'); // 16 * 8 + 6 = 134
Computes the RFC 5424 PRI value from a facility and severity.
PRI = facility * 8 + severity. Both inputs are resolved first, so names and numbers give the same result.