$npx skillfedfor your agent

python-json-logger

JSON Log Formatter for the Python Logging Package

Worth itPyPI LoggingReleased Mar 2026122.1M downloads / moBSD-2-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_json_logger-4.1.0-py3-none-any.whl
v4.1.0 · released 2026-03-29 · Python >=3.10

Yes. This is a lightweight, mature, actively maintained library with zero dependencies and permissive licensing. It solves a concrete problem—making Python logs machine-readable—with minimal friction. Install it if you need JSON-formatted logs for aggregation or centralized monitoring.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low install friction with no runtime dependencies.
  • Actively maintained with recent releases; last commit 2026-08-09 and latest release 2026-03-29.

License · maintenance · safety

BSD-2-Clause (permissive) — BSD-2-Clause is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.

last release 2026-03-29 (138 days) · last repo commit 2026-08-09 · 267 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 122,072,365 downloads/mo, #301 on PyPI

Verify before relying

import logging
from python_json_logger import jsonlogger

logger = logging.getLogger()
logHandler = logging.StreamHandler()
formatter = jsonlogger.JsonFormatter()
logHandler.setFormatter(formatter)
logger.addHandler(logHandler)
logger.info('message')
  • Whether the package integrates with specific log aggregation platforms like ELK or Splunk
  • Whether the package supports custom JSON field mapping or filtering
Same gist for agents: .md · .json

What it is and what it does

Python JSON Logger is a formatter for Python's standard logging module that converts log records into JSON format. Instead of plain-text log lines, it outputs structured JSON objects that can be parsed and indexed by log aggregation platforms. This makes logs machine-readable and enables easier filtering, searching, and analysis in production environments.

The package integrates directly with Python's built-in logging system as a handler formatter. It has no external runtime dependencies, making it lightweight to add to existing projects. The library is mature, actively maintained, and typed for use with static analysis tools.

Use it for

  • Convert application logs to JSON format for ingestion into log aggregation systems.
  • Standardize log output across microservices for centralized monitoring.
  • Enable structured querying and filtering of logs in production environments.
  • Integrate Python logging with services that expect JSON-formatted input.
  • Improve log searchability by embedding context as JSON fields.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a lightweight, mature, actively maintained library with zero dependencies and permissive licensing. It solves a concrete problem—making Python logs machine-readable—with minimal friction. Install it if you need JSON-formatted logs for aggregation or centralized monitoring.

Install

python-json-logger on PyPI

Before you install

Low install friction with no runtime dependencies. Actively maintained with recent releases; last commit 2026-08-09 and latest release 2026-03-29. Supports current Python versions (3.10–3.14).

Requires Python 3.10 or later.

License in practice

BSD-2-Clause is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

import logging
from python_json_logger import jsonlogger

logger = logging.getLogger()
logHandler = logging.StreamHandler()
formatter = jsonlogger.JsonFormatter()
logHandler.setFormatter(formatter)
logger.addHandler(logHandler)
logger.info('message')

Verify before relying

  • Whether the package integrates with specific log aggregation platforms like ELK or Splunk
  • Whether the package supports custom JSON field mapping or filtering

Package facts

LicenseBSD-2-Clause permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 138 days since the last release
Last repo commit
First released
Downloads122,072,365 / month, #301 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 6 - MatureIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: System :: LoggingTyping :: Typed

Evidence: python_json_logger-4.1.0-py3-none-any.whl

Tags

Capabilities
json logging pythonstructured logging formatterjson log outputpython logging jsonmachine readable logslog aggregation formattingjson log handler
Topics
loggingjson-outputstructured-logs

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “json logging python”

  • python-json-loggerFormats Python logging output as JSON, making logs machine-readable…
  • logging-jsonFormats Python logging records as JSON output, enabling structured…
  • logstash_formatterFormats Python logging output as JSON objects compatible with…

Give your agent the search over MCP, or paste the wish link into any chat.

More Logging packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
structlog Worth it
PyPI · Logging · released Jun 2026

structlog is a structured logging library that lets you emit logs as dictionaries with flexible output formats (JSON, logfmt, console) and integrates with Python's standard logging or runs standalone.

Install it if your application needs JSON or logfmt output, or if you want to add rich context to logs without string formatting.

MIT OR Apache-2.0pure Python · 3.10+
113.6Mdownloads / mo
loguru Worth it
PyPI · Logging · released Dec 2024

Loguru provides a pre-configured logger that replaces Python's standard logging with a simpler, zero-boilerplate interface for writing log messages to stderr, files, or custom handlers.

Install it if you want logging to feel natural but with the power, structure that production code needs.

MITpure Python
81.9Mdownloads / mo
coloredlogs With conditions
PyPI · Software Development · released Jun 2021

Adds colored output to Python's standard logging module using ANSI escape sequences, with automatic fallback support for Windows terminals.

However, it is abandoned and receives no maintenance, so it will not adapt to future Python changes or platform updates.

MITpure Pythonabandoned
39.6Mdownloads / mo
wandb Worth it
PyPI · Python Modules · released Aug 2026

wandb is a machine learning experiment tracking and visualization platform that logs metrics, hyperparameters, datasets, and models to a centralized dashboard for monitoring and comparing training runs.

Install it if you need centralized experiment tracking, comparison, and visualization for machine learning projects; skip it if you prefer local-only logging or have…

MITcompiled wheel · 3.10+
26.4Mdownloads / mo
progressbar2 Worth it
PyPI · Libraries · released Aug 2026

progressbar2 renders text-based progress bars in the terminal, handling custom widgets, concurrent bars, unknown-length progress, and clean output around logs and prints.

BSD-3-Clausepure Python · 3.10+
19.3Mdownloads / mo

See also JSON-log-formatter · logfmter · logzero · logging-json · loki-logger-handler · jsonformatter · mo-logs · flake8-json · tinybird-python-sdk · django-log-formatter-asim