skillfed

logzio-python-handler

Logging handler to send logs to your Logz.io account with bulk SSL

logzio-python-handler v4.1.9 950.9K downloads/30d#4,658 on PyPI36
Permissive license Apache License 2 Active released

What it is and what it does

This package provides a Python logging handler that integrates with Python's standard logging module to ship logs to Logz.io. It queues logs in a background thread, batches them by size, and sends them over HTTPS in bulk. If the main thread exits, it drains the queue one final time before shutting down. When logs fail to send after retries, they are written to the local filesystem as a fallback, allowing manual recovery later via curl.

The handler is designed for applications that need centralized log aggregation without blocking on network I/O. It supports configuration via Python's logging config file format or dict config, dynamic extra fields per log entry, and optional trace context correlation when using OpenTelemetry instrumentation. The package has been in production use since 2016 and is actively maintained.

Use it for:

  • Centralize application logs from multiple Python services into a single Logz.io account for unified monitoring and search.
  • Batch log shipment in background threads to avoid blocking application code on network latency or Logz.io availability.
  • Automatically retry failed log sends and persist logs locally when Logz.io is temporarily unreachable.
  • Add dynamic metadata fields to individual log entries without pre-configuring them in the handler setup.
  • Correlate application logs with distributed traces by enabling OpenTelemetry trace context enrichment.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python logging handler that sends logs in bulk over HTTPS to Logz.io, with automatic queuing, retry logic, and local fallback storage on send failure.

Yes. This is a stable, actively maintained handler with low install friction, no known vulnerabilities, and permissive licensing. Install it if you use Logz.io and want to ship Python application logs via the standard logging module with built-in retry and fallback behavior. The only caveat is to verify that protobuf is actually needed for your use case, as it appears to be a transitive dependency rather than a direct requirement.

Install

logzio-python-handler on PyPI

pip

pip install logzio-python-handler

uv

uv add logzio-python-handler

poetry

poetry add logzio-python-handler

Installing logzio-python-handler

Before you install

Low install friction with only two runtime dependencies (requests and protobuf). Actively maintained with recent commits and tested against modern Python versions from 3.5 through 3.14.

License in practice

Licensed under Apache License 2 (permissive), allowing use in most commercial and open-source projects without significant restrictions.

Quickstart

import logging
import logging.config

LOGGING = {
    'version': 1,
    'handlers': {
        'logzio': {
            'class': 'logzio.handler.LogzioHandler',
            'token': 'YOUR_LOGZIO_TOKEN',
            'logzio_type': 'python-handler',
            'url': 'https://listener.logz.io:8071',
        }
    },
    'root': {'handlers': ['logzio'], 'level': 'INFO'}
}
logging.config.dictConfig(LOGGING)
logger = logging.getLogger()
logger.info('Test log')

Requires a valid Logz.io account token and network access to the Logz.io listener endpoint (defaults to https://listener.logz.io:8071).

Verify before relying

  • Whether protobuf is actually used at runtime or is a transitive dependency that could be removed
  • Performance characteristics when handling high-volume log streams or large individual log entries
  • Behavior and data retention of local filesystem fallback when Logz.io is unreachable

Package facts

License Apache License 2 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, protobuf
Maintenance actively maintained — 194 days since the last release
Last repo commit
First released
Downloads 950,948/month — #4,658 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: logzio_python_handler-4.1.9-py2.py3-none-any.whl

Keywords: logging, handler, logz.io, bulk, https

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3.9

Tags

logz.io logging handlersend logs to logz.iopython bulk log shippinghttps log aggregationlogging handler with retry
log-shippinglogz-ioobservability

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

splunk-handler

A Python logging handler that sends log events…

permissive · top 5,000 on PyPI

logging-azure-rest

Provides a Python logging handler that…

permissive · top 5,000 on PyPI

pygelf

Provides Python logging handlers that send log…

permissive · top 15,000 on PyPI

python3-logstash

A Python logging handler that forwards log…

permissive · top 15,000 on PyPI

python-logging-loki

A Python logging handler that sends log records…

permissive · top 5,000 on PyPI

cloudwatch

A Python logging handler that sends log events…

permissive · top 15,000 on PyPI

fluent-logger

Sends structured event logs from Python…

unclear · top 5,000 on PyPI

libadvian

Provides a collection of small utility helpers…

permissive · top 15,000 on PyPI

watchtower

Watchtower is a Python logging handler that…

permissive · top 1,000 on PyPI

graypy

Provides Python logging handlers that format…

permissive · top 15,000 on PyPI