Access and control log capturing. Captured logs are available through the following properties/methods:: * caplog.messages -> list of format-interpolated log messages * caplog.text -> string containing formatted log output * caplog.records -> list of loggi
(request: FixtureRequest)
| 481 | |
| 482 | @fixture |
| 483 | def caplog(request: FixtureRequest) -> Generator[LogCaptureFixture, None, None]: |
| 484 | """Access and control log capturing. |
| 485 | |
| 486 | Captured logs are available through the following properties/methods:: |
| 487 | |
| 488 | * caplog.messages -> list of format-interpolated log messages |
| 489 | * caplog.text -> string containing formatted log output |
| 490 | * caplog.records -> list of logging.LogRecord instances |
| 491 | * caplog.record_tuples -> list of (logger_name, level, message) tuples |
| 492 | * caplog.clear() -> clear captured records and formatted log output string |
| 493 | """ |
| 494 | result = LogCaptureFixture(request.node, _ispytest=True) |
| 495 | yield result |
| 496 | result._finalize() |
| 497 | |
| 498 | |
| 499 | def get_log_level_for_setting(config: Config, *setting_names: str) -> Optional[int]: |
nothing calls this directly
no test coverage detected