Repository navigation
json-logging 1.6.0
Release date: October 21, 2026
This release introduces configurable JSON field exclusion, improves correlation-ID handling across supported web frameworks, adds Sanic compatibility fixes, and provides new tested deployment examples.
What's new
Added
- Configurable JSON field exclusion — Use
json_logging.EXCLUDED_FIELDSto omit selected fields from JSON log records. The feature is optional and disabled by default. ([#129](#129), fixes #98)
Fixed
- FastAPI correlation propagation — Consistent correlation IDs across synchronous and asynchronous endpoints, background tasks, streaming responses, and supported context-inheriting execution. ([#123](#123), fixes #124)
- Flask, Quart, and Connexion — Logs outside active HTTP requests use
-rather than generating misleading correlation IDs. ([#127](#127), fixes #125) - Non-web logging —
get_correlation_id()safely returns-when no request framework is initialized. ([#128](#128), fixes #126) - Sanic compatibility — Fixed initialization failures with Sanic 24+ logging configurations. ([#133](#133))
Documentation and examples
- FastAPI + Uvicorn — Tested startup patterns that prevent accidental double initialization. ([#130](#130), fixes #106)
- Flask + Gunicorn — Runnable integration example with worker initialization, correlation-ID handling, structured logs, and integration tests. ([#131](#131), fixes #25)
Compatibility and verification
- Existing JSON output fields remain unchanged unless
EXCLUDED_FIELDSis explicitly configured. - FastAPI request-context propagation uses the Python 3.9+ implementation path.
- Unit tests passed on Python 3.9–3.14.
- Framework smoke tests passed for FastAPI, Flask, Quart, and Sanic.
- All 15 required CI jobs passed on the tagged release commit.
Installation
pip install --upgrade json-logging==1.6.0PyPI: https://pypi.org/project/json-logging/1.6.0/
Full changelog: https://github.com/bobbui/json-logging-python/blob/1.6.0/CHANGELOG.md
Maintainers and credits
Authors: Bob T., Udit Agrawal
Package maintainer: Udit Agrawal
Thank you to the project's maintainers and contributors for helping improve its reliability, framework compatibility, and documentation.