protected function encodePriority($facility, $priority)
    {
        if (is_string($facility)) {
            $facility = static::$facilityNames[$facility];
        }
        if (is_string($priority)) {
            $priority = static::$priorityNames[$priority];
        }
        return ($facility << 3) | $priority;
    }