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
| 2204 | # Null handler |
| 2205 | |
| 2206 | class NullHandler(Handler): |
| 2207 | """ |
| 2208 | This handler does nothing. It's intended to be used to avoid the |
| 2209 | "No handlers could be found for logger XXX" one-off warning. This is |
| 2210 | important for library code, which may contain code to log events. If a user |
| 2211 | of the library does not configure logging, the one-off warning might be |
| 2212 | produced; to avoid this, the library developer simply needs to instantiate |
| 2213 | a NullHandler and add it to the top-level logger of the library module or |
| 2214 | package. |
| 2215 | """ |
| 2216 | def handle(self, record): |
| 2217 | """Stub.""" |
| 2218 | |
| 2219 | def emit(self, record): |
| 2220 | """Stub.""" |
| 2221 | |
| 2222 | def createLock(self): |
| 2223 | self.lock = None |
| 2224 | |
| 2225 | def _at_fork_reinit(self): |
| 2226 | pass |
| 2227 | |
| 2228 | # Warnings integration |
| 2229 |
no outgoing calls
no test coverage detected