palindromicity / simple-syslog-5424

A java library for parsing valid RFC 5324 syslog
Apache License 2.0
5 stars 5 forks source link

Simple Syslog should parse out the facility and severity #11

Closed ottobackwards closed 6 years ago

ottobackwards commented 6 years ago

The facility and severity can be parsed out of the priority and save someone the trouble down the line

 int pri = Integer.parseInt(priority);
                int sev = pri % 8;
                int facility = pri / 8;