NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #291 most downloaded on PyPI
JSON Log Formatter for the Python Logging Package
Last release 1 months ago
15 Aug 2026
Release timing varies
gaps range from 8 days to 1.8 years
Some releases are documented
notes for 18 of 36 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
39 releases · first in 2013
Logging a dict no longer modifies it. exc_info and stack_info were previously added to the caller's dict. #66
dict no longer modifies it. exc_info and stack_info were previously added to the caller's dict. #66project.optional-dependencies.dev to [dependency-groups].dev (PEP 735). #46$ style formats now support unbraced $name fields, not just ${name}. #18Thanks @gaoflow, @prateek-dagar, @Sanjays2402
Add support for Python 3.14, PyPy 3.11
One column per quarter.
Support DictConfigurator prefixes for rename_fields and static_fields. #45
DictConfigurator prefixes for rename_fields and static_fields. #45
ext://sys.stderr in fileConfig/dictConfig value fields.fmt (style=",") e.g. "asctime,message,levelname" #15
python-json-logger and thus care should be taken not to pass this format to other logging Formatter implementations.fmt. #16pythonjsonlogger.core.LogRecord and log_record arguments to avoid confusion / overlapping with logging.LogRecord. #38
pythonjsonlogger.core.BaseJsonFormatter (and any child classes).
serialize_log_recordadd_fieldsjsonify_log_recordprocess_log_recordlog_record have not had their function name changed.DictConfigurator ext:// prefix format when using fileConfig/dictConfig. #47
pythonjsonlogger.json.JsonFormatter: json_default, json_encoder, json_serializer.pythonjsonlogger.orjson.OrjsonFormatter: json_default.pythonjsonlogger.msgspec.MsgspecFormatter: json_default.Thanks @rubensa
Support DictConfigurator prefixes for rename_fields and static_fields . #45
DictConfigurator prefixes for rename_fields and static_fields. #45
ext://sys.stderr in fileConfig/dictConfig value fields.fmt (style=",") e.g. "asctime,message,levelname" #15
python-json-logger and thus care should be taken not to pass this format to other logging Formatter implementations.fmt. #16pythonjsonlogger.core.LogRecord and log_record arguments to avoid confusion / overlapping with logging.LogRecord. #38
pythonjsonlogger.core.BaseJsonFormatter (and any child classes).
serialize_log_recordadd_fieldsjsonify_log_recordprocess_log_recordlog_record have not had their function name changed.DictConfigurator ext:// prefix format when using fileConfig/dictConfig. #47
pythonjsonlogger.json.JsonFormatter: json_default, json_encoder, json_serializer.pythonjsonlogger.orjson.OrjsonFormatter: json_default.pythonjsonlogger.msgspec.MsgspecFormatter: json_default.Thanks @rubensa
Nothing published for this version
exc_info_as_array and stack_info_as_array options are added to pythonjsonlogger.core.BaseJsonFormatter allowing both to be encoded as list of lines in
exc_info_as_array and stack_info_as_array options are added to pythonjsonlogger.core.BaseJsonFormatter allowing both to be encoded as list of lines instead of a single multi-line string. #35msgspec-python313-pre from dev dependencies preventing potential RCE. Details: GHSA-wmxh-pxcx-9w24Thanks @1hakusai1 and @omnigodz
Import error on import pythonjsonlogger.jsonlogger #29
Nothing published for this version
pythonjsonlogger.[ORJSON,MSGSPEC]_AVAILABLE no longer imports the respective package when determining availability.
pythonjsonlogger.[ORJSON,MSGSPEC]_AVAILABLE no longer imports the respective package when determining availability.pythonjsonlogger.[orjson,msgspec] now throws a pythonjsonlogger.exception.MissingPackageError when required libraries are not available. These contain more information about what is missing whilst still being an ImportError.defaults parameter is no longer ignored and now conforms to the standard library. Setting a defaults dictionary will add the specified keys if the those keys do not exist in a record or weren't passed by the extra parameter when logging a message.typing_extensions is only installed on Python version < 3.10.msgspec has only been tested against pre-release versions.Thanks @cjwatson and @bharel
This splits common funcitonality out to allow supporting other JSON encoders. Although this is a large refactor, backwards compatibility has been main
This splits common funcitonality out to allow supporting other JSON encoders. Although this is a large refactor, backwards compatibility has been maintained.
pythonjsonlogger.core - more details below.pythonjsonlogger.defaults module that provides many functions for handling unsupported types.pythonjsonlogger.orjson.OrjsonFormatter with the following additions:
"ValueError: bad value passed"__str__ if available, else __repr__ if available, else will use __could_not_encode__pythonjsonlogger.msgspec.MsgspecFormatter with the following additions:
"ValueError: bad value passed"__str__ if available, else __repr__ if available, else will use __could_not_encode__int or str jcrist/msgspec#680pythonjsonlogger.jsonlogger has been moved to pythonjsonlogger.json with core functionality moved to pythonjsonlogger.core.pythonjsonlogger.core.BaseJsonFormatter properly supports all logging.Formatter arguments:
fmt is unchanged.datefmt is unchanged.style can now support non-standard arguments by setting validate to Falsevalidate allows non-standard style arguments or prevents calling validate on standard style arguments.default is ignored.pythonjsonlogger.json.JsonFormatter default encodings changed:
BaseException instead of Exception. Now "pretty prints" the exception using the exception name and message e.g. "ValueError: bad value passed"__str__ if available, else __repr__ if available, else will use __could_not_encode__mkdocs is stored in docs/README.md has been moved to docs/index.md and docs/qucikstart.md.CHANGELOG.md has been moved to docs/change-log.mdSECURITY.md has been moved and replaced with a symbolic link to docs/security.md.pythonjsonlogger.jsonlogger is now pythonjsonlogger.jsonpythonjsonlogger.jsonlogger.RESERVED_ATTRS is now pythonjsonlogger.core.RESERVED_ATTRS.pythonjsonlogger.jsonlogger.merge_record_extra is now pythonjsonlogger.core.merge_record_extra.pythonjsonlogger.jsonlogger.JsonFormatter._str_to_fn replaced with pythonjsonlogger.core.str_to_object.Fix spelling of parameter json_serialiser -> json_serializer (#8) - @juliangilbey
json_serialiser -> json_serializer (#8) - @juliangilbeyNote: using new major version to separate changes from this fork and the original (upstream). See #1 for details.
Note: using new major version to separate changes from this fork and the original (upstream). See #1 for details.
RESERVED_ATTRS is now a list and version dependentJsonFormatter.__init__ return type (None) - @nhairspyproject.toml - @nhairsFull Changelog: https://github.com/nhairs/python-json-logger/compare/v2.0.7...v3.0.0
Fix inclusion of py.typed in pip packages - @sth
Fix inclusion of py.typed in pip packages - @sth
Added pytest support with test file rename. Migrated to assertEqual
Parameter rename_fields in merge_record_extra is now optional - @afallou
Allow reserved attrs to be renamed - @henkhogan
Allow reserved attrs to be renamed - @henkhogan
Support added for Python 3.11
Now verifying builds in Pypy 3.9 as well
Type annotations are now in the package - @louis-jaris
Fix rename_fields for exc_info - @guilhermeferrari
Cleaned up test file for PEP8 - @lopagela
Cleaned up old Python 2 artifacts - @louis-jaris
Dropped Python 3.5 support - @idomozes
Moved type check via tox into 3.11 run only
Added test run in Python3.6 (will keep for a little while longer, but it's EOL so upgrade)
Fix too strict regex for percentage style logging - @aberres
Add PEP 561 marker/basic mypy configuration. - @bringhurst
Add PEP 561 marker/basic mypy configuration. - @bringhurst
Workaround logging.LogRecord.msg type of string. - @bringhurst
Changed a link archive of the reference page in case it's down. - @ahonnecke
Removed unnecessary try-except around OrderedDict usage - @sozofaan
Update documentation link to json module + use https - @deronnax
Dropped 3.5 support. - @bringhurst
Officially supporting 3.9 - @felixonmars.
Officially supporting 3.9 - @felixonmars.
You can now add static fields to log objects - @cosimomeli.
Dropped 3.4 support.
Dropped Travis CI for Github Actions.
Wheel should build for python 3 instead of just 3.4 now.
Support Pypi long descripton - @ereli-cb
Added timezone support to timestamps - @lalten
New Changelog
Added timezone support to timestamps - @lalten
Refactored log record to function - @georgysavva
Add python 3.8 support - @tommilligan
Support for Python 2.7
Debian directory
'stack_info' flag in logging calls is now respected in JsonFormatter by @ghShu
Back to top
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →