This class is like a StreamHandler using sys.stderr, but always uses whatever sys.stderr is currently set to rather than the value of sys.stderr at handler construction time.
| 1273 | |
| 1274 | |
| 1275 | class _StderrHandler(StreamHandler): |
| 1276 | """ |
| 1277 | This class is like a StreamHandler using sys.stderr, but always uses |
| 1278 | whatever sys.stderr is currently set to rather than the value of |
| 1279 | sys.stderr at handler construction time. |
| 1280 | """ |
| 1281 | def __init__(self, level=NOTSET): |
| 1282 | """ |
| 1283 | Initialize the handler. |
| 1284 | """ |
| 1285 | Handler.__init__(self, level) |
| 1286 | |
| 1287 | @property |
| 1288 | def stream(self): |
| 1289 | return sys.stderr |
| 1290 | |
| 1291 | |
| 1292 | _defaultLastResort = _StderrHandler(WARNING) |
no outgoing calls
no test coverage detected
searching dependent graphs…