MCPcopy Index your code
hub / github.com/python/cpython / encodePriority

Method encodePriority

Lib/logging/handlers.py:955–966  ·  view source on GitHub ↗

Encode the facility and priority. You can pass in strings or integers - if strings are passed, the facility_names and priority_names mapping dictionaries are used to convert them to integers.

(self, facility, priority)

Source from the content-addressed store, hash-verified

953 self.socktype = socktype
954
955 def encodePriority(self, facility, priority):
956 """
957 Encode the facility and priority. You can pass in strings or
958 integers - if strings are passed, the facility_names and
959 priority_names mapping dictionaries are used to convert them to
960 integers.
961 """
962 if isinstance(facility, str):
963 facility = self.facility_names[facility]
964 if isinstance(priority, str):
965 priority = self.priority_names[priority]
966 return (facility << 3) | priority
967
968 def close(self):
969 """

Callers 1

emitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected