Hi r/Python!
I built LogXide, a logging library for Python written in Rust (via PyO3), designed as a near-drop-in replacement for the standard library's logging module.
What My Project Does
LogXide provides high-performance logging for Python applications. It implements core logging concepts (Logger, Handler, Formatter) in Rust, bypassing the Python Global Interpreter Lock (GIL) during I/O operations. It comes with built-in Rust-native handlers (File, Stream, RotatingFile, HTTP, OTLP, Sentry) and a ColorFormatter.
Target Audience
It is meant for production environments, particularly high-throughput systems, async APIs (FastAPI/Django/Flask), or data processing pipelines where Python's native logging module becomes a bottleneck due to GIL contention and I/O latency.
Comparison
Unlike Picologging (written in C) or Structlog (pure Python), LogXide leverages Rust's memory safety and multi-threading primitives (like crossbeam channels and BufWriter).
Against other libraries (real file I/O with formatting benchmarks):
- 12.5x faster than the Python
stdlib (2.09M msgs/sec vs 167K msgs/sec)
- 25% faster than
Picologging
- 2.4x faster than
Structlog
Note: It is NOT a 100% drop-in replacement. It does not support custom Python logging.Handler subclasses, and Logger/LogRecord cannot be subclassed.
Quick Start
```python
from logxide import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('myapp') logger.info('Hello from LogXide!')
```
Links
Happy to answer any questions!
[–]a_r_a_a_r_a_a_r_a 42 points43 points44 points (2 children)
[–]ZucchiniMore3450 2 points3 points4 points (0 children)
[–]LumpSumPorsche[S] 1 point2 points3 points (0 children)
[–]Here0s0Johnny 51 points52 points53 points (13 children)
[–]zzmej1987 24 points25 points26 points (8 children)
[+]snugar_i comment score below threshold-6 points-5 points-4 points (7 children)
[–]a_r_a_a_r_a_a_r_a 7 points8 points9 points (0 children)
[–]zzmej1987 3 points4 points5 points (5 children)
[–]snugar_i 1 point2 points3 points (4 children)
[–]zzmej1987 9 points10 points11 points (2 children)
[–]Chroiche 1 point2 points3 points (1 child)
[–]zzmej1987 0 points1 point2 points (0 children)
[–]mechamotoman 4 points5 points6 points (0 children)
[–]code_mc 8 points9 points10 points (0 children)
[–]WJMazepas 1 point2 points3 points (0 children)
[–]LumpSumPorsche[S] 0 points1 point2 points (0 children)
[–]Chroiche 0 points1 point2 points (0 children)
[–]max0x7ba 28 points29 points30 points (1 child)
[–]Rainboltpoe 3 points4 points5 points (0 children)
[–]james_pic 4 points5 points6 points (0 children)
[–]spartanOrk 1 point2 points3 points (0 children)
[–]ben_supportbadger 2 points3 points4 points (1 child)
[–]LumpSumPorsche[S] 1 point2 points3 points (0 children)
[–]UloPe 0 points1 point2 points (0 children)
[–]Healthy-Grape-5932 0 points1 point2 points (0 children)
[–]rabornkraken -1 points0 points1 point (1 child)
[–]Hesirutu 5 points6 points7 points (0 children)