python3-logstash
Python logging handler for Logstash.
What it is and what it does
python3-logstash is a Python logging handler that bridges Python's standard logging module to Logstash, a log aggregation and processing platform. It captures log records and ships them to a Logstash instance via UDP or TCP, optionally supporting AMQP transport. The handler integrates seamlessly with Django and Gunicorn through standard Python logging configuration, allowing you to attach structured log data as extra fields and forward everything to a centralized Logstash pipeline.
The package has no runtime dependencies and installs as a pure Python wheel, making setup friction minimal. However, it has been abandoned since 2018—the last release predates major Python and Logstash evolution—so it will not adapt to schema changes or modern Python versions without external maintenance.
Use it for:
- Forward Django application logs to Logstash for centralized monitoring and analysis across multiple instances.
- Ship Gunicorn access and error logs to Logstash using TCP or UDP handlers configured in logging.conf.
- Aggregate Python application logs with custom extra fields (strings, booleans, dicts, lists) into a Logstash index.
- Route exception stack traces and application errors to Logstash for alerting and debugging workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python logging handler that forwards log messages to Logstash via UDP or TCP, integrating Python's standard logging framework with Logstash for centralized log aggregation.
Yes, if you are already running Logstash and need a lightweight Python logging bridge on a stable, unchanging codebase. No, if you require active maintenance, compatibility with recent Python versions, or support for modern Logstash schema versions—consider a maintained alternative or direct HTTP/JSON logging instead.
Install
python3-logstash on PyPI
pip
pip install python3-logstashuv
uv add python3-logstashpoetry
poetry add python3-logstashInstalling python3-logstash
Before you install
Installation is straightforward with no runtime dependencies. However, the package is abandoned—last release was 2018-07-12 and last commit 2023-05-12—so it will not receive updates for Python or Logstash schema changes.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install python3-logstash
import logging
import logstash
test_logger = logging.getLogger('python-logstash-logger')
test_logger.setLevel(logging.INFO)
test_logger.addHandler(logstash.LogstashHandler('localhost', 5959, version=1))
test_logger.info('test message')
Logstash must be running and listening on the specified host and port; optional AMQP support requires pika to be installed separately.
Verify before relying
- Whether the package works with current Logstash versions and modern Python releases beyond those it was originally tested against.
- Whether UDP/TCP message format remains compatible with contemporary Logstash event schema versions.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,955 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 811,833/month — #5,001 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python3_logstash-0.4.80-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
logging-treeVisualizes the hierarchy of loggers, handlers,…
permissive · top 15,000 on PyPI
logtail-pythonA Python client library for sending structured…
permissive · top 5,000 on PyPI
python-logstashSends Python log records to Logstash over UDP…
permissive · top 15,000 on PyPI
python-logstash-asyncAsynchronous Python logging handler that…
permissive · top 5,000 on PyPI
seqlogSeqLog sends Python log records to Seq, a…
permissive · top 15,000 on PyPI
pylogbeatPyLogBeat sends log messages and structured…
permissive · top 5,000 on PyPI
pygelfProvides Python logging handlers that send log…
permissive · top 15,000 on PyPI
graypyProvides Python logging handlers that format…
permissive · top 15,000 on PyPI
logstash_formatterFormats Python logging output as JSON objects…
permissive · top 15,000 on PyPI
logzio-python-handlerA Python logging handler that sends logs in…
permissive · top 5,000 on PyPI