MCPcopy Create free account
hub / github.com/hynek/structlog / _configure_for_processor_formatter

Function _configure_for_processor_formatter

tests/test_stdlib.py:1026–1041  ·  view source on GitHub ↗

Configure structlog to use ProcessorFormatter. Reset logging setting after the test (structlog is reset automatically before all tests).

()

Source from the content-addressed store, hash-verified

1024
1025@pytest.fixture(name="configure_for_processor_formatter")
1026def _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
1044def configure_logging(

Callers

nothing calls this directly

Calls 2

configureFunction · 0.90
LoggerFactoryClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…