I am having to parse the Facility and Severity of syslog messages in Python. These values come with each message as a single integer. The severity of the event is 0-7, spe
Just apply a bit mask:
sev = int(pri) & 0x07
(0x07 is 00000111)