Structlog is a Python library for structured logging. It’s useful for producing consistent, machine-readable log events that can be formatted and processed for debugging, monitoring, and application logging workflows.
Project status
- Actively maintained, with a recent upstream push on 2026-05-11, and a steady stream of recent version updates (latest shown: 25.5.0).
- Update cadence appears roughly every 2 to 4 months in the recent 2025 window (25.1.0 on 2025-01-16, 25.2.0 on 2025-03-11, 25.3.0 on 2025-04-25, 25.4.0 on 2025-06-02, 25.5.0 on 2025-10-27).
AI summary generated 2 weeks ago
Recent updates
25.5.0
7 months agoStructlog 25.5.0 centers on a much more capable ConsoleRenderer, which can now be retrieved and mutated at runtime, plus several logging and traceback ergonomics improvements. The release also expands native logger interpolation, adds qualified callsite names, and fixes a handful of edge cases around timestamps, recursion, and Windows color handling.
Features25.4.0
6/2/2025This release focuses on Python 3.14 and 3.13.4 compatibility and adds first-class exception-group support to traceback rendering. It also fixes `ExceptionPrettyPrinter` so custom `exception_formatter` callables are now honored.
BreakingFeatures25.3.0
4/25/2025This is a small patch release for structlog that fixes TimeStamper so custom format strings honor utc=True again. The only runtime code change is in processors.TimeStamper, plus a developer tooling update to the Ruff pre-commit hook.
25.2.0
3/11/2025This release is a small API and typing-focused update for structlog. It adds exception notes to traceback stacks, makes BoundLogger's binding methods more precise for type checkers, and improves TimeStamper so custom formats can include timezone offsets.
Features25.1.0
1/16/2025This release focuses on exception handling hardening, adds a new processor for positional logging arguments, and brings native logger helpers closer to the standard library. It also tightens ConsoleRenderer output formatting and expands type support around bound logger chaining.
Features24.4.0
7/17/2024This release is effectively a documentation and packaging refresh. The published notes are accurate about there being no runtime code changes, but the diff shows updated Read the Docs and PyPI README generation plumbing.
24.3.0
7/17/2024This release improves exception traceback rendering and normalizes testing log levels. The biggest code changes are in `structlog.tracebacks`, where locals can be formatted via Rich and new filtering options were added, and in `structlog.testing.capture_logs()`, which now rewrites `exception` to `error`.
Features24.2.0
5/27/2024This release focuses on structlog console and log formatting improvements, plus several callsite and stdlib logging fixes. Most changes are bug fixes and optimizations, with new options for level padding and better async callsite handling.
Features24.1.0
1/8/2024This is a focused 24.1.0 bugfix release for structlog. It restores correct lazy logger context behavior, fixes the level label emitted by `BoundLogger.exception()`, and makes `RichTracebackFormatter` honor its configured width. The remaining changes are mostly CI, docs, and tooling maintenance.
23.3.0
12/29/2023structlog 23.3.0 expands ConsoleRenderer configurability and adds asyncio support to callsite information collection. It also tweaks the default processor setup returned by recreate_defaults, and includes several fixes around stdlib integration and lazy proxy behavior.
Features