This handler does nothing. It's intended to be used to avoid the "No handlers could be found for logger XXX" one-off warning. This is important for library code, which may contain code to log events. If a user of the library does not configure logging, the one-off warning might be
| 2285 | # Null handler |
| 2286 | |
| 2287 | class NullHandler(Handler): |
| 2288 | """ |
| 2289 | This handler does nothing. It's intended to be used to avoid the |
| 2290 | "No handlers could be found for logger XXX" one-off warning. This is |
| 2291 | important for library code, which may contain code to log events. If a user |
| 2292 | of the library does not configure logging, the one-off warning might be |
| 2293 | produced; to avoid this, the library developer simply needs to instantiate |
| 2294 | a NullHandler and add it to the top-level logger of the library module or |
| 2295 | package. |
| 2296 | """ |
| 2297 | def handle(self, record): |
| 2298 | """Stub.""" |
| 2299 | |
| 2300 | def emit(self, record): |
| 2301 | """Stub.""" |
| 2302 | |
| 2303 | def createLock(self): |
| 2304 | self.lock = None |
| 2305 | |
| 2306 | def _at_fork_reinit(self): |
| 2307 | pass |
| 2308 | |
| 2309 | # Warnings integration |
| 2310 |
no outgoing calls
no test coverage detected
searching dependent graphs…