Fast and Low Latency Logging Library for Rust
Introduction
low-latency-log is a high-performance and low-latency Rust logging library.
Features
- Very Low Latency:
low-latency-logis designed with performance in mind, utilizing techniques such as minimizing the size of critical data structures, avoiding locks on critical paths, and caching formatted strings. - Async Logging:
low-latency-logoffloads all heavy logging operations (such as formatting, time conversion, etc.) to independent threads, ensuring the calling thread is not blocked.
Benchmark
low-latency-log offers comparable p999 latency to quill and leads in throughput among quill, spdlog-rs, ftlog, and fast_log.
For more details, please refer to the Benchmark.
To build the benchmark binaries, run:
Usage example
use ;
use fs;
TODOs
The following optimizations are in progress:
- Optimize std
format!. - Improve
ufmtto provide more types of formatting support (e.g., floating-point types). - Support custom format types, as currently
low_latency_logoutputs fixed time and log formats. - Optimize performance when using the
logcrate.
low_latency_log is heavily inspired by the following projects
License
This project is licensed under the Apache License.
Some code comes from the logflume project. Please refer to LICENSE-LOGFLUME for more information.