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)
| 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 |