ecs-logging
Logging formatters for ECS (Elastic Common Schema) in Python
Decision gist · record as of 2026-08-14
Yes. Low install friction, no dependencies, active maintenance, and production-stable status make it a straightforward choice if you use Elastic Stack or APM. The permissive Apache-2.0 license poses no restrictions. Install it if you need ECS-formatted logs for Elasticsearch or APM correlation; skip it if you don't use Elastic tooling.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Active maintenance, last commit 2026-07-26, supporting current Python versions (3.8–3.14).
- Production-stable classifier.
License · maintenance · safety
permissive license (permissive) — Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions.
last release 2026-01-19 (207 days) · last repo commit 2026-07-26 · 73 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,912,088 downloads/mo, #2,826 on PyPI
Alternatives
Verify before relying
pip install ecs-logging
import logging
from ecs_logging import StdlibFormatter
logger = logging.getLogger()
handler = logging.StreamHandler()
handler.setFormatter(StdlibFormatter())
logger.addHandler(handler)
logger.info('message')- Whether ECS 1.6 implementation covers all current ECS specification features needed for your use case
- Exact APM agent version compatibility for log correlation with Elastic APM Python agent
What it is and what it does
ecs-logging is a Python logging formatter that converts log records into Elastic Common Schema (ECS) JSON format. It integrates with Python's standard logging module to output structured logs that Elastic Stack tools can parse and index natively. The library implements ECS 1.6 and supports automatic correlation with Elastic APM traces when used alongside the Elastic APM Python agent, allowing logs to be linked to spans, transactions, and traces in APM dashboards.
The package has no runtime dependencies and works with Python 3.8 through 3.14. It is maintained by Elastic and marked production-stable, with active development and recent commits. Installation is straightforward via pip, and integration typically requires only adding the formatter to a logging handler.
Use it for
- Correlate application logs with Elastic APM traces to debug performance issues across distributed systems
- Stream structured logs to Elasticsearch for centralized log aggregation and analysis
- Replace ad-hoc JSON logging with a standardized schema that Elastic tooling understands out of the box
- Standardize log format across microservices using a common schema recognized by Elastic Stack
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no dependencies, active maintenance, and production-stable status make it a straightforward choice if you use Elastic Stack or APM. The permissive Apache-2.0 license poses no restrictions. Install it if you need ECS-formatted logs for Elasticsearch or APM correlation; skip it if you don't use Elastic tooling.
Install
ecs-logging on PyPI
Before you install
Low install friction with no runtime dependencies. Active maintenance, last commit 2026-07-26, supporting current Python versions (3.8–3.14). Production-stable classifier.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install ecs-logging
import logging
from ecs_logging import StdlibFormatter
logger = logging.getLogger()
handler = logging.StreamHandler()
handler.setFormatter(StdlibFormatter())
logger.addHandler(handler)
logger.info('message')
Verify before relying
- Whether ECS 1.6 implementation covers all current ECS specification features needed for your use case
- Exact APM agent version compatibility for log correlation with Elastic APM Python agent
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 207 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,912,088 / month, #2,826 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Logging |
Evidence: ecs_logging-2.3.0-py3-none-any.whl
Tags
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 › “ECS logging formatter”
- ecs-loggingFormats Python logs as Elastic Common Schema (ECS) JSON, enabling…
- opensearch-loggerProvides a Python logging handler that sends log records directly to…
- huaweicloudsdkecsPython SDK for Huawei Cloud Elastic Compute Service (ECS) that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Logging packages
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.
Formats Python logging output as JSON, making logs machine-readable for parsing and ingestion into log aggregation tools.
Install it if you need JSON-formatted logs for aggregation or centralized monitoring.
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.
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.
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.
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…
See also json-logging · opensearch-logger · opentelemetry-instrumentation-structlog · alibabacloud-ecs20140526 · pylogbeat · elastic-apm · aliyun-python-sdk-ecs · elastic-transport · python3-logstash