Planet Python
Follow
Speed Matters: fastlogging-rs
fastlogging-rs is a high-performance, Rust-powered logging framework designed to address logging bottlenecks in applications. It offers significant speed improvements, with file writing up to 147 times faster than Python's built-in logging and 9 times faster than Apache Log4j. The framework provides a non-blocking, asynchronous architecture where writers operate in background threads, preventing slowdowns in the main application. It supports eight programming languages (Rust, Python, C, C++, Go, Java, C#) through thin wrappers, all sharing a similar API for consistent logging across diverse tech stacks. Key features include optional file rotation, compression, AES encryption for network logging, and configuration via API or file. fastlogging-rs also automatically forwards log messages from subprocesses to the main process. This initial release, 0.8.1, includes the Rust core and bindings for the supported languages. Installation is straightforward using package managers like cargo for Rust or pip for Python. The project is open-source, licensed under MIT or Apache-2.0, with source code and documentation available on GitHub. Benchmarks demonstrate its superior performance in both standard and rotating file logging scenarios. fastlogging-rs aims to provide substantial performance benefits with minimal code changes, making migration from existing logging frameworks easy.