Configure structlog to use ProcessorFormatter. Reset logging setting after the test (structlog is reset automatically before all tests).
()
| 1024 | |
| 1025 | @pytest.fixture(name="configure_for_processor_formatter") |
| 1026 | def _configure_for_processor_formatter(): |
| 1027 | """ |
| 1028 | Configure structlog to use ProcessorFormatter. |
| 1029 | |
| 1030 | Reset logging setting after the test (structlog is reset automatically |
| 1031 | before all tests). |
| 1032 | """ |
| 1033 | configure( |
| 1034 | processors=[add_log_level, ProcessorFormatter.wrap_for_formatter], |
| 1035 | logger_factory=LoggerFactory(), |
| 1036 | wrapper_class=BoundLogger, |
| 1037 | ) |
| 1038 | |
| 1039 | yield |
| 1040 | |
| 1041 | logging.basicConfig() |
| 1042 | |
| 1043 | |
| 1044 | def configure_logging( |
nothing calls this directly
no test coverage detected
searching dependent graphs…