Skip to main content

Fastest Python logging library — Rust-powered, stdlib-compatible API

Project description

LogXide

2.7x faster Python logging, powered by Rust.

Same stdlib API. Same getLogger. Same format strings. Just faster.

# Before                              # After
import logging                        from logxide import logging

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger('myapp')
logger.info('Hello, world!')          # 2.7x faster. Same code.

PyPI Python License: MIT CI

Installation

pip install logxide
# With Sentry integration
pip install logxide[sentry]

Performance

Real-world file logging benchmarks (Python 3.12, 100K iterations):

Scenario LogXide Picologging (C) stdlib logging vs Pico vs stdlib
Simple 446,135 ops/s 372,020 ops/s 157,220 ops/s +20% +184%
Structured 412,235 ops/s 357,193 ops/s 153,547 ops/s +15% +168%
Error 426,294 ops/s 361,053 ops/s 155,332 ops/s +18% +174%

20% faster than Picologging (C-based, Microsoft). 2.7x faster than stdlib. Full benchmarks →

Works With

LogXide intercepts stdlib logging — most libraries work without changes.

Framework / Library Status Notes
Flask app.logger automatically intercepted
Django LOGGING dictConfig supported
FastAPI / Uvicorn All uvicorn loggers intercepted
SQLAlchemy SQL query logging via echo=True
requests / httpx HTTP connection logs captured
boto3 / botocore AWS SDK logs captured
Sentry Native integration — auto-detects SDK
Celery ⚠️ Requires setup_logging signal (guide)
pytest ⚠️ Use caplog_logxide instead of caplog

Full compatibility guide for 20+ libraries →

Built-in Sentry Integration

No extra handlers. No configuration. Just works.

import sentry_sdk
sentry_sdk.init(dsn="your-dsn")

from logxide import logging

logger = logging.getLogger(__name__)
logger.error("This is automatically sent to Sentry")
  • Auto-detects Sentry SDK
  • WARNING+ sent as events, INFO as breadcrumbs
  • Full stack traces and custom context

Native OpenTelemetry Support

Ship logs to any OTLP-compatible backend with zero dependencies:

from logxide import OTLPHandler

handler = OTLPHandler(
    url="http://localhost:4318/v1/logs",
    service_name="my-service"
)

Quick Start

from logxide import logging

# Basic setup — same API as stdlib
logging.basicConfig(
    level=logging.INFO,
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)

logger = logging.getLogger('myapp')
logger.info('Hello from LogXide!')
logger.warning('This works exactly like stdlib logging')

Custom fields with extra

logger.info("User logged in", extra={
    "user_id": 12345,
    "ip": "192.168.1.1",
    "metadata": {"browser": "Chrome", "version": 120}
})

HTTP log shipping

from logxide import HTTPHandler

handler = HTTPHandler(
    url="https://logs.example.com",
    global_context={"app": "myapp", "env": "production"},
    transform_callback=lambda records: {
        "logs": [{"msg": r["msg"], "level": r["levelname"]} for r in records]
    }
)

What's Different from stdlib

LogXide reimplements Python's logging in Rust for speed. The API is the same, but some advanced stdlib patterns aren't supported:

Feature Status
getLogger, info, debug, warning, error, critical ✅ Same API
basicConfig, format strings, levels, filters ✅ Same API
FileHandler, StreamHandler, RotatingFileHandler ✅ Rust-native
HTTPHandler, OTLPHandler ✅ Rust-native, high throughput
Custom Python handlers via addHandler() ⚠️ Works, but bypasses Rust pipeline
Subclassing LogRecord or Logger ❌ Rust types, not subclassable
pytest caplog fixture ⚠️ Use caplog_logxide instead

Instead of subclassing LogRecord, use extra={} for custom fields, global_context for metadata, or transform_callback for output transformation.

Compatibility

  • Python: 3.12, 3.13, 3.14, 3.15 (All fully tested and supported)
  • Platforms: macOS, Linux, Windows
  • Dependencies: None (Rust compiled into native extension)

Documentation

Contributing

git clone https://github.com/Indosaram/logxide
cd logxide
pip install maturin
maturin develop
pytest tests/

See development guide for details.

License

MIT License — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logxide-0.1.18.tar.gz (267.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

logxide-0.1.18-cp314-cp314-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.14Windows x86-64

logxide-0.1.18-cp314-cp314-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

logxide-0.1.18-cp314-cp314-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

logxide-0.1.18-cp313-cp313-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.13Windows x86-64

logxide-0.1.18-cp313-cp313-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

logxide-0.1.18-cp313-cp313-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

logxide-0.1.18-cp312-cp312-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.12Windows x86-64

logxide-0.1.18-cp312-cp312-win32.whl (1.8 MB view details)

Uploaded CPython 3.12Windows x86

logxide-0.1.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

logxide-0.1.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ s390x

logxide-0.1.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ppc64le

logxide-0.1.18-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

logxide-0.1.18-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARMv7l

logxide-0.1.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

logxide-0.1.18-cp312-cp312-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

logxide-0.1.18-cp312-cp312-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file logxide-0.1.18.tar.gz.

File metadata

  • Download URL: logxide-0.1.18.tar.gz
  • Upload date:
  • Size: 267.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for logxide-0.1.18.tar.gz
Algorithm Hash digest
SHA256 3e0c65c84b4dd2862e292bbc57f61583807177827cceb13f28945a55d39a2927
MD5 622eecff8dda63e2edfe82287a2669bf
BLAKE2b-256 96b339af7b74f9582e37ee1250a3a9886c4b1923f9103cf26194c33c3a22b4ce

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ed3a32b25700a381582fd92f5a6b5d38fbbfd1cd949a39aab61b3a0a483d26ce
MD5 3239e6a4f0b199fce626f4da41253ae2
BLAKE2b-256 9d85a7c8d1139ba802385c546828f2607c8fb072fb00012f46ec18884cd2b243

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 300467a076a7196999f7f77dca23488a4a1e8d7cdd7fdf9db12c316ae70ad455
MD5 99c7333a2e16f198e7de81c1269c7d3e
BLAKE2b-256 cc0b5c7f1378735e20f40f5fe5492e02d1b771ace81976a29a72ca68632934ca

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2aa0fdf891e605fb4cfe10992be842c329c4c8f8129dc9ee63e3897dc71e298b
MD5 d757f4521172df12bb196d46543bfe1f
BLAKE2b-256 f205bc51e42ecc56e32e897bb5a075621d639a3cc5a294dcad0aeecc8397a6d7

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a8cd593b5bc2ee60898286388a1b3351a8bc379dda940b9f21730bf3fcfedf64
MD5 5410979ac84017fe5cc36688d8e31744
BLAKE2b-256 87d0a8195b5d53d542adcd35eca9ac63e92f8522ebf8b584b1ba2b50db685d5a

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 231140fabc29b7f1908a28743745402f57928002aa0a24cacff57058027b7cef
MD5 b712ca7ea23e725517933e7731aca374
BLAKE2b-256 461a8ea339bc0188baf475768c0c5a5008170e94b1ac0a6a4884cd27073e98c1

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4c672a6d6a9d86f6d89eeecb1385881d51ac42687a78475a3c6fe723cae1a628
MD5 c5f8f6e33556a0919f62d88f284b6d15
BLAKE2b-256 d0763ecccc713cede3421b389ffcf6d3aa620ee3f75801ae4c629e799f323e2b

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bca370bdf455bcc085bd503ac2f376c3771cc9b8308c97e742f57cc4d87dd307
MD5 79f8d924f6fd66d0a380d73a880d6a1d
BLAKE2b-256 826eef99895f99fd4fb3ccd4c44090a2302cbfca12333dd0bc051a7a4f562bc6

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-win32.whl.

File metadata

  • Download URL: logxide-0.1.18-cp312-cp312-win32.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.3

File hashes

Hashes for logxide-0.1.18-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 240c42be89f172790e894172341eb432727b19d7fd35c11c32ae3c1c54869d3d
MD5 04b9c1643b32defa66ddcf52999e384f
BLAKE2b-256 c7f0cff585812ad1856e9d7be9cc2a3744a2e189181ecfeb8792d3bc7c2e04df

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 494377d5bdcc1920c01c5aaf411014248183ae24f41f5d8de511b93ec8d412e4
MD5 dfb8ae02e328d3c41c617bf145aa5e4a
BLAKE2b-256 a718cb4be50c8072731e38a56cabb1fa1d1e1fd53876f94ebd2e0dc982ca550f

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 dec877995fb093a7c44c3d9de3e0df585006525679baba67361279bec4a2dc6f
MD5 a5095a11b17f40190f5a032526afadff
BLAKE2b-256 e89f55fe3c45ab1394d5257cc0e7cb1504973f5aecbac1f68046145238c57f7b

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 5d8c8f5fee980aa10b6480d71886ab946db714249f0e67e74e5d3e79b9dc9286
MD5 00aadb6626c36c8bf66985d16ddfd3ce
BLAKE2b-256 24b457ff9f2bfc43144e036a10f45bdfb28da11b4bd8050c151a2003fa063754

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 c337955e155efd7c17bd238ff1944c2a7a4ce8408601b6ea66e6da83c39bd3c8
MD5 67ccd8009f4501de7e0fa83ada0edb64
BLAKE2b-256 facb6dd4c21790bf34429b04e4cefc56af387e8a325c35ee08334833f08542ea

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3f660a4c5bee856aff6b3f9da09bb28fec2a053318d882c9263a213362a621ca
MD5 3b383c40000b215a90316734d189fd7d
BLAKE2b-256 6d43dfe73b0d51940e4ab5685b712e4d396388f999289e211904c416c18b82b8

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6789ea9f0a821283cf164d9bf6723d72805fbd3600b322b52da34c654347f32a
MD5 7b4e499d95ccb444636062117476610d
BLAKE2b-256 a6c7c8a29e39280a168205f21acda4db5fb93f7c1d4dfa16a5bc0e193db927ef

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 936d93a07f8283adb7baf2ec0daf43273a12ac869314729accaf1a4472581252
MD5 ec1fe6082b6ecdf1fd2e26c9a72da59d
BLAKE2b-256 76a54984c8f28628064d4b4c29cd630ef9ad7a85976a64404f1f582a373fdf96

See more details on using hashes here.

File details

Details for the file logxide-0.1.18-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for logxide-0.1.18-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 32c784c831a2089a07eb20d5f561aa81cd3aa5df4833ed91bb9e6fc893c0dc69
MD5 7230796eff7b6ad880b20f0989ac7fde
BLAKE2b-256 6bb22164f785d56269979809bda0e98b646c11f7264888f841267312a3c4d952

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page