NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #5123 most downloaded on PyPI
JSON Python Logging
Latest stable
1.6.0
Last release 1 months ago
21 Oct 2026
Ships unpredictably
gaps range from 2 weeks to 3.4 years
Nearly every release is documented
notes for 30 of 31 stable releases
2 versions withdrawn
withdrawn after publishing
9 years old
38 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
This release introduces configurable JSON field exclusion, improves correlation-ID handling across supported web frameworks, adds Sanic compatibility
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.
json_logging.EXCLUDED_FIELDS to omit selected fields from JSON log records. The feature is optional and disabled by default. ([#129](https://github.com/bobbui/json-logging-python/pull/129), fixes #98)- rather than generating misleading correlation IDs. ([#127](https://github.com/bobbui/json-logging-python/pull/127), fixes #125)get_correlation_id() safely returns - when no request framework is initialized. ([#128](https://github.com/bobbui/json-logging-python/pull/128), fixes #126)EXCLUDED_FIELDS is explicitly configured.pip install --upgrade json-logging==1.6.0
PyPI: https://pypi.org/project/json-logging/1.6.0/
Full changelog: https://github.com/bobbui/json-logging-python/blob/1.6.0/CHANGELOG.md
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.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
json_logging.EXCLUDED_FIELDS: an optional list, tuple, set or frozenset of field names to omit from every JSON
record (application, web and request logs, including extra and props entries). The default is (), so
existing applications need no change and their output fields stay the same. Set it before init_*(); formatters
read it when they are created. An invalid value (a bare string, or a non-string entry) raises TypeError from
init_*() or init_request_instrument() before any state changes, so it can be corrected and retried. This is
an output-formatting option, not a security redaction control. (#129, fixes #98)json_logging.get_correlation_id() use the request's correlation ID instead of -
in synchronous (def) endpoints. When request instrumentation is enabled with init_request_instrument(app), the
current request is kept in a context variable for the duration of the request, including for URLs excluded from
request logging. It is visible to def and async def endpoints, sync and async BackgroundTasks,
StreamingResponse iterators, and work that inherits the request's context, such as asyncio.create_task()
(also after the response is sent), asyncio.to_thread(), contextvars.copy_context().run() and AnyIO/Starlette
threadpool workers. Without a correlation header, one ID is created at the start of each request, so all logs of
that request share it. (#123, fixes #124)-, as documented, instead of a
new random correlation ID per record. Connexion 3 error handlers and ASGI middleware, which run outside the Flask
request context, still use the request's correlation header; without one they get -, because a generated ID is
only stored inside the Flask request context. (#127, fixes #125)json_logging.get_correlation_id() returns - after init_non_web(), or before any init_*(), instead of
raising AttributeError. (#128, fixes #126)init_sanic() no longer raises KeyError: 'format' with Sanic 24.x and later, whose default logging
configuration omits formatter format keys. Older Sanic configurations are still supported. (#133)RuntimeError: Can not call init more than once occurs when a module started as a
script also passes an import string to uvicorn, two working startup patterns, reload and multiple workers, and a
tested example in example/fastapi_startup. The duplicate-initialisation guard is unchanged. (#130, fixes #106)example/gunicorn_flask covering initialisation once per worker, request
instrumentation, correlation IDs, which output is JSON and on which stream, and Gunicorn's access and error logs;
with integration tests that run real Gunicorn workers. (#131, fixes #25)EXCLUDED_FIELDS left at its default, the JSON fields of
every record are the same as in 1.5.1; fields are only removed when an application lists them.-
instead of a random ID (Flask, Quart, Connexion), non-web get_correlation_id() no longer raises, FastAPI
synchronous endpoints now get the request's ID, and Sanic 24+ initialises.threading.Thread, loop.run_in_executor()),
WebSocket endpoints, and applications without init_request_instrument(app) keep the previous behaviour. There, a
thread or handler finds the request only if the request object is in one of its own frames, for example as a
request argument; otherwise it logs -.fix: update utcnow for python 3.12 deprecation #107
refactoring to have cleaner structure and smaller module
refactoring to have cleaner structure and smaller module
fix #77 Implement extra properties from json-logging-py https://pypi.org/project/json-logging/1.4.1rc0/
allow overriding of correlation id
allow overriding of correlation id
https://pypi.org/project/json-logging/1.4.0rc2/
refactor #68 https://pypi.org/project/json-logging/1.4.0rc1/
refactor #68 https://pypi.org/project/json-logging/1.4.0rc1/
add capability to customize extraction of request, response info #68
add capability to customize extraction of request, response info #68
https://pypi.org/manage/project/json-logging/release/1.4.0rc0/
https://pypi.org/project/json-logging/1.3.0/
https://pypi.org/project/json-logging/1.3.0/
fix Sanip IP information is a str not a list #63 https://pypi.org/project/json-logging/1.2.11/
re fix #61 Using root logger + flask outside of flask request context throws RuntimeError
https://pypi.org/project/json-logging/1.2.9/ fix #61 Using root logger + flask outside of flask request context throws RuntimeError
https://pypi.org/project/json-logging/1.2.9/ fix #61 Using root logger + flask outside of flask request context throws RuntimeError
https://pypi.org/project/json-logging/1.2.8/
https://pypi.org/project/json-logging/1.2.8/
- yanked, wrong branch released
Fix condition for checking root logger handlers #53
Fix condition for checking root logger handlers #53
https://pypi.org/project/json-logging/1.2.6/
exclude specific API endpoints from logging requests fix #44 https://pypi.org/project/json-logging/1.2.5/
exclude specific API endpoints from logging requests fix #44 https://pypi.org/project/json-logging/1.2.5/
- fix #51
Nothing published for this version
- fix #50
https://pypi.org/project/json-logging/1.2.1/
https://pypi.org/project/json-logging/1.2.1/
optimization log record https://pypi.org/project/json-logging/1.2.0/
https://pypi.org/project/json-logging/1.1.0/
https://pypi.org/project/json-logging/1.1.0/
https://pypi.org/project/json-logging/1.0.6/
https://pypi.org/project/json-logging/1.0.6/
https://pypi.org/project/json-logging/1.0.5/
https://pypi.org/project/json-logging/1.0.5/
- fix #30
add missing kwargs for init_non_web https://pypi.org/project/json-logging/1.0.3/
add missing kwargs for init_non_web https://pypi.org/project/json-logging/1.0.3/
add method to support getting request logger by using method json_logging.get_request_logger(), fix #23 https://pypi.org/project/json-logging/1.0.2/
https://pypi.org/project/json-logging/1.0.1/
https://pypi.org/project/json-logging/1.0.1/
add more specific init method for each framework
Breaking change:
https://pypi.org/project/json-logging/1.0.0/
fix: add japanese character encoding for json logger #24
fix: add japanese character encoding for json logger #24
Add Connexion support
Add Connexion support
- Add Connexion support
https://pypi.org/project/json-logging/0.0.13/
https://pypi.org/project/json-logging/0.0.13/
https://pypi.org/project/json-logging/0.0.12/
https://pypi.org/project/json-logging/0.0.12/
https://pypi.org/project/json-logging/0.0.11/
https://pypi.org/project/json-logging/0.0.11/
https://pypi.org/project/json-logging/0.0.10/
https://pypi.org/project/json-logging/0.0.10/
https://pypi.org/project/json-logging/0.0.9/
https://pypi.org/project/json-logging/0.0.9/
Nothing published for this version
PyPi page: https://pypi.python.org/pypi/json-logging/0.0.1 Download from here
PyPi page: https://pypi.python.org/pypi/json-logging/0.0.1 Download from here
One column per quarter.