Facility+Severity to PRI value.

This commit is contained in:
Mark Nellemann 2021-01-26 15:52:02 +01:00
parent 5c76a2fafe
commit c80d8a5ff8
1 changed files with 2 additions and 4 deletions

View File

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