Facility+Severity to PRI value.

This commit is contained in:
Mark Nellemann 2021-01-26 15:52:02 +01:00
parent 5c76a2fafe
commit c80d8a5ff8

View file

@ -64,11 +64,9 @@ public class SyslogPrinter {
return sb.toString(); return sb.toString();
} }
// TODO: Facility+Severity to PRI field
static private String getPri(Facility facility, Severity severity) { static private String getPri(Facility facility, Severity severity) {
return "<13>"; int prival = (facility.toNumber() * 8) + severity.toNumber();
return String.format("<%d>", prival);
} }
} }