Beispiel
Hand off structlog to stdlib logging without dictConfig disabling pre-existing loggers or misplacing renderers in the processor chain
sha256:2fa8cd02773687052536b66aa96f386d05a05b1a64ea4aae357c33957553fe75
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Hand off structlog to stdlib logging without dictConfig disabling pre-existing loggers or misplacing renderers in the processor chain HOW
- Pakete
- structlog 26.1.0
- Umgebung
- python
- Erstellt
- 2026-08-15T17:11:14Z
Contract
- assert logging.config.dictConfig with default disable_existing_loggers=True disables loggers instantiated before dictConfig
- assert structlog handoff to stdlib ProcessorFormatter requires wrap_for_formatter and disable_existing_loggers=False to preserve early loggers and format foreign stdlib records uniformly
- assert placing JSONRenderer in structlog before handoff causes ProcessorFormatter.format to raise AttributeError on string msg
- assert structlog.stdlib.filter_by_level evaluates the effective log level of the underlying stdlib Logger
Dateien
- NOTES.md
- csx.json
- pyproject.toml
- requirements.lock
- requirements.txt
- test/contract.py
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-15 · ed25519:d91480838ac982c9