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

Method mapPriority

Lib/logging/handlers.py:979–987  ·  view source on GitHub ↗

Map a logging level name to a key in the priority_names map. This is useful in two scenarios: when custom levels are being used, and in the case where you can't do a straightforward mapping by lowercasing the logging level name because of locale- specific iss

(self, levelName)

Source from the content-addressed store, hash-verified

977 logging.Handler.close(self)
978
979 def mapPriority(self, levelName):
980 """
981 Map a logging level name to a key in the priority_names map.
982 This is useful in two scenarios: when custom levels are being
983 used, and in the case where you can't do a straightforward
984 mapping by lowercasing the logging level name because of locale-
985 specific issues (see SF #1524081).
986 """
987 return self.priority_map.get(levelName, "warning")
988
989 ident = '' # prepended to all messages
990 append_nul = True # some old syslog daemons expect a NUL terminator

Callers 1

emitMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected