Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Lo3: High-Performance Python Logging with Rust (Alpha Version)

Overview

Lo3 is an extremely fast, Rust-based logging solution for Python applications. It provides a simple Python interface while leveraging Rust's performance to deliver logging capabilities up to 80 times faster than Python's native logging module in high-volume scenarios.

Please Note: This is an alpha version with limited features. Currently, RustPyLogger only supports logging to files. Additional features are in active development.

Current Features

  • High-performance logging to files (up to 80x faster than Python's native logging)
  • Python-friendly API with familiar log levels (debug, info, warning, error)
  • Thread-safe operations
  • Efficient handling of high-volume logs
  • Support for additional context (kwargs) in log messages
  • Minimal CPU and memory overhead

Planned Features (In Development)

  • Support for all handlers provided in logging
  • Structured logging support
  • Asynchronous logging
  • Log rotation and archiving
  • Configurable log formatting

Installation

  • via pypi:
    pip install lo3
    

Usage

Here's a simple example of how to use Lo3 in its current alpha state:

from lo3 import RustLogger

# Initialize the logger (currently only supports file logging)
logger = RustLogger("app.log")

# Log messages at different levels
logger.debug("This is a debug message", {"extra": "info"})
logger.info("This is an info message")
logger.warning("This is a warning")
logger.error("This is an error", {"error_code": 500})

# Ensure all logs are written
logger.flush()

Performance

In our benchmarks, Lo3 showed significant performance improvements over Python's native logging module:

  • Test: Writing 1,000,000 log messages (250,000 each of debug, info, warning, and error) to a file
  • Lo3: ~101.39 seconds
  • Python's logging module: ~522.20 seconds

This represents an ~5x(~80%) speedup in this high-volume logging scenario.

Benchmarking

To run the benchmarks yourself:

  1. clone https://github.com/DataEnggNerd/MH370
  2. Run the provided tests script:
    python tests/test-lo3.py
    python tests/test-logging.py
    

Contributing

As this is an alpha version, we welcome contributions, especially for the features currently in development. Please feel free to submit pull requests, create issues, or suggest new features.

Limitations

  • Currently only supports logging to files
  • No support yet for log rotation or size limits
  • Configuration options are limited in this alpha version

Acknowledgments

Metadata

Release files for lo3 0.3.1a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lo3 0.3.1a0
File Size Uploaded Provenance Actions
lo3-0.3.1a0.tar.gz 7.6 kB Without provenance Details for lo3-0.3.1a0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lo3 0.3.1a0
File Interpreter ABI Platform Actions
lo3-0.3.1a0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for lo3-0.3.1a0-cp312-cp312-macosx_11_0_arm64.whl

Total release size: 288.4 kB

Release files / lo3-0.3.1a0.tar.gz

Download URL lo3-0.3.1a0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6dcdc9470ade6552482d4917078ed19a41113d3e32abc259b242249dfe5be075
BLAKE2b-256 checksum
How to use checksums
f73d0993641e5cf396faa9216b7b980d528e2b5bac419b7b07b7ebf28b7ba117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Release files / lo3-0.3.1a0-cp312-cp312-macosx_11_0_arm64.whl

Download URL lo3-0.3.1a0-cp312-cp312-macosx_11_0_arm64.whl
Size 280.8 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1c9329eb7175bf3670b60cb383302060179efb134be50441cdaa7b7f6417a406
BLAKE2b-256 checksum
How to use checksums
3630a054d699467f98b3afadf827b9c2d9343d443d18bfff8ba653c7251ed83c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.7.1

Security for lo3 0.3.1a0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page