--- id: graypy version: "2.1.0" license: BSD License license_treatment: permissive maintenance: dormant --- # graypy — Python logging handlers that send messages in the Graylog Extended Log Format (GELF). License: permissive · Maintenance: dormant · Downloads: 561.5K/mo ## What it is and what it does graypy is a Python logging handler library that bridges the standard logging module to Graylog servers by formatting log records in GELF and forwarding them over the network. It provides five handler classes—GELFUDPHandler, GELFTCPHandler, GELFTLSHandler, GELFHTTPHandler, and GELFRabbitHandler—each supporting a different transport mechanism. The library automatically includes debugging fields (function name, process ID, thread name) in logs and supports custom fields via LoggerAdapter or Filter classes. It also handles exception tracebacks and GELF UDP message chunking with configurable overflow behavior. The package has no runtime dependencies for basic UDP/TCP/HTTP use, making it lightweight to install. Optional AMQP support for RabbitMQ-based log forwarding requires the amqp extra. However, the project is dormant—the last release was in September 2019 and the last repository commit in October 2023—so it receives no active maintenance and may not work reliably with recent Graylog or Python versions. Use it for: - Forward application logs from a Python service to a centralized Graylog server for aggregation and analysis. - Integrate Django application logging with Graylog by configuring GELFUDPHandler in Django's logging dictConfig. - Send logs via RabbitMQ instead of UDP to avoid packet loss in high-volume logging scenarios. - Add custom contextual fields (user ID, request ID, etc.) to logs using LoggerAdapter before forwarding to Graylog. - Capture and forward exception tracebacks to Graylog as full_message fields for debugging. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python logging handlers that format and send log messages to Graylog servers in GELF (Graylog Extended Log Format) via UDP, TCP, TLS, HTTP, or RabbitMQ. Yes, if you have a stable, older Graylog deployment and do not need active maintenance. The package is simple, dependency-free for basic use, and permissively licensed. No, if you require support for recent Python versions, current Graylog API changes, or active bug fixes—the dormant status since 2019 means you are on your own for compatibility issues. ## Install pip install graypy uv add graypy poetry add graypy ## Installing graypy Before you install: Low install friction with no runtime dependencies for basic use. Package is dormant—last release was 2019-09-30 and last commit 2023-10-24—so expect no active maintenance or updates for newer Python versions or Graylog API changes. License in practice: BSD License (permissive) allows use in most projects without significant restriction, though you should review the full license text for your specific use case. Quickstart: pip install graypy import logging import graypy my_logger = logging.getLogger('test_logger') my_logger.setLevel(logging.DEBUG) handler = graypy.GELFUDPHandler('localhost', 12201) my_logger.addHandler(handler) my_logger.debug('Hello Graylog.') Requires a Graylog server running and accessible at the specified host and port; RabbitMQ handler requires amqp extra and a configured RabbitMQ instance. Verify before relying: - Whether the package works reliably with current Graylog versions (3.x and later) given the long dormancy since 2019. - Compatibility with Python versions released after 2019 (classifiers only list up to 3.7). - Whether UDP packet loss handling and chunking behavior meet production requirements. ## Package facts - License: BSD License (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 561.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags graylog logging handler, gelf log format python, send logs to graylog, python graylog integration, gelf udp tcp handler, centralized log forwarding, graylog2 graylog3 client, graylog-integration, centralized-logging [View on SkillFed](https://skillfed.io/packages/graypy) · [View on PyPI](https://pypi.org/project/graypy/)