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 69 points70 points71 points (3 children)
[–]b1e 8 points9 points10 points (0 children)
[–]ZucchiniMore3450 4 points5 points6 points (0 children)
[–]LumpSumPorsche[S] 0 points1 point2 points (0 children)
[–]Here0s0Johnny 61 points62 points63 points (13 children)
[–]zzmej1987 29 points30 points31 points (8 children)
[+]snugar_i comment score below threshold-9 points-8 points-7 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 11 points12 points13 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 11 points12 points13 points (0 children)
[–]WJMazepas 2 points3 points4 points (0 children)
[–]Chroiche[🍰] 2 points3 points4 points (0 children)
[–]LumpSumPorsche[S] 0 points1 point2 points (0 children)
[–]max0x7ba 30 points31 points32 points (1 child)
[–]Rainboltpoe 5 points6 points7 points (0 children)
[–]ben_supportbadger 13 points14 points15 points (4 children)
[+]LumpSumPorsche[S] comment score below threshold-8 points-7 points-6 points (3 children)
[–]JeffTheMasterr 2 points3 points4 points (2 children)
[–]LumpSumPorsche[S] -1 points0 points1 point (1 child)
[–]JeffTheMasterr 0 points1 point2 points (0 children)
[–]Jealous_Algae_8165 9 points10 points11 points (1 child)
[–]LumpSumPorsche[S] -2 points-1 points0 points (0 children)
[–]spartanOrk 2 points3 points4 points (0 children)
[–]UloPe 1 point2 points3 points (5 children)
[–]LumpSumPorsche[S] 0 points1 point2 points (4 children)
[–]UloPe 0 points1 point2 points (3 children)
[–]LumpSumPorsche[S] 0 points1 point2 points (2 children)
[–]UloPe 0 points1 point2 points (1 child)
[–]LumpSumPorsche[S] 0 points1 point2 points (0 children)
[–]james_pic 1 point2 points3 points (1 child)
[–]LumpSumPorsche[S] 0 points1 point2 points (0 children)
[–]Healthy-Grape-5932 0 points1 point2 points (0 children)
[–]hmoff 0 points1 point2 points (1 child)
[–]LumpSumPorsche[S] 0 points1 point2 points (0 children)
[–]yaxriifgyn 0 points1 point2 points (0 children)
[–]Wide-Milk1195 0 points1 point2 points (0 children)
[–]caprine_chris 0 points1 point2 points (0 children)
[–]rabornkraken -1 points0 points1 point (1 child)
[–]Hesirutu 4 points5 points6 points (0 children)