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
The normal way to extract the least significant bits would be to do a bitwise AND with the appropriate mask (7 in this case)